Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: Set date programmatically - HOWTO?
Thread ID: 331190 Message ID: 331190 # Views: 44 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Network and Computer Management
Date: Tuesday, December 27, 2011 5:11:33 PM         
   


Colleagues,

Suppose you need to test some program that manages the period data, say - for the month of January, February, etc., and it determines this periood by the today's date's month (i.e., December, like - now), and you need to test it for another month.

IOW, if it's today (December) - then your program would pick up the data (by the date field in a table) for November.

However, you need to have your system date set to January temporarily.

Besides the obvious move (changing the system date on your PC by clicking on that date/time pad in the right corner of the Task Bar) - is there any way to set the date programmatically in VFP? (Needless to say that I'd like to move the system date in a test launcher program, and resore it back to the today's date at the end of this launcher program.)

Any ideas?

TIA!

Regards,

Ilya

ENTIRE THREAD

Set date programmatically - HOWTO? Posted by Ilya Rabyy @ 12/27/2011 5:11:33 PM
RE: Set date programmatically - HOWTO? Posted by M. Tanveer Ul Hassan Shaheen @ 12/27/2011 6:03:38 PM
RE: Set date programmatically - HOWTO? Posted by Luis Maria Guayan @ 12/27/2011 6:18:37 PM
RE: Set date programmatically - HOWTO? Posted by Ilya Rabyy @ 12/27/2011 6:37:57 PM
RE: Set date programmatically - HOWTO? Posted by Pete Sass @ 12/27/2011 6:29:12 PM