开发者

how to format a date in delphi

开发者 https://www.devze.com 2023-01-12 05:59 出处:网络
How should I write the following select in delphi: select to_char(sysdate, \'dd.mm.yyyy hh:mm:ss) from dual

How should I write the following select in delphi:

select to_char(sysdate, 'dd.mm.yyyy hh:mm:ss) from dual

When I try to execute it I receive an error, but this works:

select to_char(sysdate) from dual

开发者_开发技巧Thanks in advance!


Missing single quote possibly at the end of your format string?

                                            *
select to_char(sysdate, 'dd.mm.yyyy hh:mm:ss') from dual 
                                            *


You might try going in to SQL*Plus and running the query that works so you can see what format Delphi seems to want.

Share and enjoy.

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号