DATETIME formatting issue

b-707

Member
Hi ALL!
From a web service I am getting an XML string, which includes values for Date/Time in the ISO format (f.e. 2011-03-09T13:02:39.123). In our DB DATETIME format defined as
99/99/9999 HH:MM:SS.SSS

What is the proper way (not manual extraction) to convert ISO format to ours?

P.S. DATETIME("2011-03-09T13:02:39.123") fails on incompatible type as expected.

TY
 
This seems to work:
Code:
DEFINE VARIABLE dDateTime AS DATETIME    NO-UNDO.
ASSIGN SESSION:DATE-FORMAT = 'ymd'.
ASSIGN dDateTime = DATETIME("2011-03-09T13:02:39.123").
MESSAGE dDateTime
    VIEW-AS ALERT-BOX INFO BUTTONS OK.
ASSIGN SESSION:DATE-FORMAT = 'dmy'.
MESSAGE dDateTime VIEW-AS ALERT-BOX INFO BUTTONS OK.

HTH,
Casper.
 
Back
Top