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 IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Windows Date Format

Status
Not open for further replies.

northman

Programmer
Dec 12, 2002
15
CA
How can I detect the setting for the Windows date (dd/mm/yyyy or mm/dd/yyyy) .
I am using CW2 and running XP Pro.

Thanks

Serge
 
Hi Serge,

The simplest way is to use the following pictures:

@D17 Windows Control Panel setting for Short Date
@D18 Windows Control Panel setting for Long Date

@T7 Windows Control Panel setting for Short Time
@T8 Windows Control Panel setting for Long Time


HTH,
Mark Goldberg
 
Hi Mark. Thank you. I was able to get it working. Here is what I did:

! Windows Date Determination
DateSave# = Today()
Date# = Date(1,15,2007)
SetToDay(Date#)
If Sub(Format(Today(),@D17),1,2) = 15 then !we have dd/mm/yyyy
DateInd = 'D'
Else
DateInd = 'M'
End
SetToDay(DateSave#)
!End


I chose Jan 15 as an arbitrary date. I was concerned about the instances where the day and month are the same i.e. feb 2, etc.

Again thanks

Serge
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top