Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Datetime stamp ambiguities
Message
 
To
09/09/1999 14:38:51
Bob Macdonald
Anthony Macaulay Associates
Victoria, British Columbia, Canada
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00263068
Message ID:
00263125
Views:
21
>I've been wondering why it is necessary to code a date (ex: dtoc{^1970.01.01})) with the hat(^) symbol included in the date. If it isn't placed inside the date, the compiler complains of an ambibuous date.
>
>Thank you in advance,
>Bob Macdonald

The caret (^) signifies a date in the strict date format. The strict date format is consistent regardless to the SET DATE setting and the SET CENTURY setting.

For example;

ldDate1 = CTOD("01/02/50")
ldDate2 = {^1950/01/02}

with SET DATE AMERICAN

lddate1 = Jan 2 1950
lddaet2 = Jan 2 1950

with SET DATE BRITISH

ldDate1 = Feb 1 1950
ldDate2 = Jan 2 1950

with SET DATE AMERICAN and SET CENTURY TO 19 ROLLOVER 51

ldDate1 = Jan 2 2050
lddaet2 = Jan 2 1950

So you can see that using a date literal that is NOT in strict date format is an ambigous date reference. You should use the strict date format for all date literals.
Previous
Reply
Map
View

Click here to load this message in the networking platform