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

how to settime() setdate() ?

Status
Not open for further replies.

jcanon

IS-IT--Management
Jun 7, 2001
33
0
0
CO
I need to set the computer date an time, how do I do this?

I'm using vfp6 , winXP

!date <some date> works
!time <some time> does not work

is there a way to do this by programming?
 
faq184-2110. Mike Gagnon

If you want to get the best response to a question, please check out FAQ184-2483 first.
 
thanks, but I have try the code and it looks that is for changing the time zone or so. I can't figure how to use the code to just set a date or a time.
 
JCanon,
As the FAQ &quot;Note&quot; implies, this API expects the date and time in GMT (Greenwich Mean Time) or UTC, so you must adjust the DateTime for your local timezone. DOS didn't worry about these things but Windows does. In fact if you format your disk in NTFS the file properties are also stored in GMT and the OS will &quot;adjust&quot; so they look like your current system settings - e.g. in Explorer. If your disk is formatted in FAT16/32, the dates stored for files are strictly local time, and they won't change if you change the TZ or Daylight Savings setting!

Rick

 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top