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

Changing System Date 1

Status
Not open for further replies.

holdenvn

Programmer
Dec 28, 2002
8
AU
G'day

I need to be able to change the system date back a certain amount before a program is run and then on exit, change it back to the correct date. If anyone could give me somewhere to start it would be greatly appreciated.

Holdenvn
 
Warning - Your users may not be amused by this!

But it's easy:

Time = Dateadd("n",-2,time)

will set the clock back 2 minutes and

Time =dateadd("n",2,time)

will set it forward 2 minutes

________________________________________________________________
If you want to get the best response to a question, please check out FAQ222-2244 first

'People who live in windowed environments shouldn't cast pointers.'
 
Thanks Johwm. Is it at all possible to set it to a specific date.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top