Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Is there a limit to the earliest date in Windows XP?

Status
Not open for further replies.

ezpzjohn

Programmer
Jun 29, 2001
50
GB
Has anyone else come across a problem with dates in Windows XP?

Although I find my VFP application runs fine and accepts any date under Windows 2000 I have a couple of users who run under Winsows XP and a date earlier that 01/01/1601 (?) will not display and causes strange effects in grids such as not displaying the rows following the row containing the "bad date".

Any ideas?

John
 

I cannot duplicate your problem. What version of VFP are you using?

I can do this in VFP9 - Windows XP (SP2)

? DATE(100,03,01) && Year 100



Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
If you set sysformats on, you'll be dependant of what dates Windows can work with. Only if you shut sysformats off you can work with dates from 1st January 100 to 31st December 9999 in foxpro. With sysformats on the minimal date is 1st January 1601.

Bye, Olaf.
 
Thanks for that Olaf. I suspected it was something to do with a Windows setting.

I do use SYSFORMAT ON so that my application uses whatever currency and date formats are already set up in Windows.

I will try recompiling the application with SYSFORMAT OFF and see if the problem still occurs for those particular users.

John
 
John,

Although VFP generally supports dates from 1 January 100, there are a few functions that do not work correctly in certain cases with dates earlier than 14 September 1752. GOMONTH() is one example. I believe this applies to all versions of VFP.

In case you're wondering, 14 Sep 1752 is the date on which England (including Britan's American colonies) switched to the New Style calendar, losing 11 days in the process (bringing it into line with Scotland and the rest of Europe). I've no idea why that should cause GOMONTH(), etc. to misbehave, but that does seem to be the case.

Mike


__________________________________
Mike Lewis (Edinburgh, Scotland)

My sites:
Visual FoxPro (www.ml-consult.demon.co.uk)
Crystal Reports (www.ml-crystal.com)
 
Thanks for that Mike, and for the interesting historiacl nugget!

Here I was for all these years thinking a date was a date! I think my best bet is to apply some validation to date entry, limiting the earliest date a user can enter. Most dates used are going to be within the last 10 years or so anyway, and a date earlier than that is usually an input error.

John
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top