Default DATE format when displaying dates is DD/MM/YY
I want to change that to DD.MM.YYYY
This is just a simple program:
DEFINE VARIABLE daDate AS DATE NO-UNDO.
daDate = TODAY.
MESSAGE daDate.
Currently the output looks like this: 16/09/20
I tried adding FORMAT "99.99.9999" after the variable name like this: DEFINE VARIABLE daDate FORMAT "99.99.9999" AS DATE NO-UNDO.
but it didn't change the output at all.
When I instead of MESSAGE
use DISPLAY
and then write it out with FORMAT, then it displays the correct format: DISPLAY daDate FORMAT "99.99.9999".
Am I doing something completely wrong or am I missing something?
您发送消息的表达式将首先转换为字符,因此您可以控制该转换:
MESSAGE STRING(daDate,"99.99.9999").
DEFINE VARIABLE hoy AS CHARACTER NO-UNDO.
hoy = STRING (DAY (TODAY), "99") + "."
+ STRING (MONTH (TODAY), "99") + "."
+ STRING (YEAR (TODAY)) .
Message hoy.
The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.