Kbase P75859: How to get a date in the ISO 8601 standard format
Autor |
  Progress Software Corporation - Progress |
Acesso |
  Público |
Publicação |
  30/12/2005 |
|
Status: Unverified
GOAL:
How to get a date in the ISO 8601 standard format
GOAL:
How to convert a DATE value to a DATE ISO 8601 compatible format
GOAL:
How to convert a DATETIME value to a DATETIME ISO 8601 compatible format
GOAL:
How to convert a DATETIME-TZ value to a DATETIME-TZ ISO 8601 compatible format
GOAL:
How to use the ISO-DATE function
FACT(s) (Environment):
OpenEdge 10.x
FIX:
The ISO-DATE function returns the character string in the standard ISO format.
The following is an example that convert a Progress datetime format to an ISO datetime format:
DEFINE VARIABLE dTimeTZ AS DATETIME-TZ NO-UNDO.
DEFINE VARIABLE cTimeTZ AS CHARACTER NO-UNDO.
DEFINE VARIABLE cTimeTZISO AS CHARACTER NO-UNDO.
ASSIGN dTimeTZ = NOW
cTimeTZ = STRING(dTimeTZ)
cTimeTZISO = ISO-DATE(dTimeTZ).
MESSAGE 'DATETIME-TZ in Progress default format : ' cTimeTZ SKIP
'DATETIME-TZ in ISO 8601 standard format : ' cTimeTZISO
VIEW-AS ALERT-BOX INFO BUTTONS OK.