Welcome To The Home Of The Visual FoxPro Experts  
home. signup. forum. archives. search. google. articles. downloads. faq. members. weblogs. file info. rss.
 From: Pete Sass
  Where is Pete Sass?
 Marathon, Ontario
 Canada
 Pete Sass
 To: Ilya Rabyy
  Where is Ilya Rabyy?
 Fountain Valley
 California - United States
 Ilya Rabyy
 Tags
Subject: RE: Set date programmatically - HOWTO?
Thread ID: 331190 Message ID: 331197 # Views: 41 # Ratings: 0
Version: Visual FoxPro 9 SP2 Category: Network and Computer Management
Date: Tuesday, December 27, 2011 6:29:12 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


Hi,
Just a wondering in your implimentation why you do not add in a datepicker control to change the date to a different period?

Then use the return value of the datepicker to get the date set and use this value or maybe you are coding your VFP to operate off the system date period and this is the only option available for you.
Pete "the IceMan", from the Great White North of Canada.
www.marathongriffincomputers.com

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