Forum Post: Inconsistency assigning date var to datetime-tz vs. using the date function

  • Thread starter Thread starter tbergman
  • Start date Start date
Status
Not open for further replies.
T

tbergman

Guest
Progress 11.3 Windows. The following code illustrates the problem. It's likely sensitive to the time zone you're in when you run it. In our testing, in the Eastern time zone, the problem occurs when we are in a timezone that is 1 hour ahead of the timezone stored in the datetime-tz variable. DEFINE VARIABLE vdateTZ AS DATETIME-TZ. DEFINE VARIABLE vDate1 AS DATE. DEFINE VARIABLE vDate2 AS DATE. vDateTZ = datetime-tz(4,9,2014,0,0,0,0,-180). vDate1 = vDateTZ. vDate2 = date(vDateTZ). MESSAGE now skip vDateTZ SKIP vDate1 SKIP vDate2 VIEW-AS ALERT-BOX. The output I get is: 04/09/2014 10:45:39.494-04:00 04/09/2014 00:00:00.000-03:00 04/08/14 04/09/14 Note the different dates shown by vDate1 and vDate2.

Continue reading...
 
Status
Not open for further replies.
Back
Top