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

Date anomaly.... 1

Status
Not open for further replies.

Mandy_crw

Programmer
Jul 23, 2020
578
PH
i came across with this problem with date, please help.... i had a program that expires when a certain date is reached... so i change the date of my laptop to test whether it will show a message of expiration, and so it did... but when i try to edit the code, the output does not change anymore... even if i put errors on it, it run on the last output... nothing is happening even if i edit the program code... what happened? please help... thanks....
 
Have you reset your date back to the correct one?

If not anything you change will not necessarily be newer than the existing files, and they might not be compiled?

That also might be the case if you changed your code while the date was ahead of your real one, and you reset that, but
made changes afterwards - while your code base was dated in a months time or whatever


Regards

Griff
Keep [Smile]ing

There are 10 kinds of people in the world, those who understand binary and those who don't.

I'm trying to cut down on the use of shrieks (exclamation marks), I'm told they are !good for you.
 
This is not a solution to your problem, but consider using the RunAsDate utility, instead of changing the date on your laptop.

From the website:
"RunAsDate is a small utility that allows you to run a program in the date and time that you specify. This utility doesn't change the current system date and time of your computer, but it only injects the date/time that you specify into the desired application.
You can run multiple applications simultaneously, each application works with different date and time, while the real date/time of your system continues to run normally."

Joe
 
I second Joe's suggestion of using RunAsDate. I've been using it for years - not to check for expiry dates, but for accounting systems when I need to test end-of-month routines and the like. It has always worked perfectly.

Mike

__________________________________
Mike Lewis (Edinburgh, Scotland)

Visual FoxPro articles, tips and downloads
 
Just erase the FXP (compiled) version of the PRG. I think the PRG won't be recompiled automatically if the date of the PRG is older than the FXP. Or the FXP is newer than the PRG.... If you run the program the FXP version is used if that one is present.
 
Thanks everyone... i've just used JackTheC and worked like charm!!!
jlcca ive used runasdate its like magic.... i dont have to change my date in my computer just for testing...
thanks everyone and God bless....
 
I think Griff has a good explanation, and Jack tells you a solution for PRG/FXP file pairs. In general, you could give all files a certain date in the past and all files and editing and compiling will behave normal again. But the simplest way will be to make use of the build option to "recompile all".

To compile single files you can also COMPILE some.prg or COMPILE CLASSLIB some.vcx, etc. and after that the file pair will be in sync again.

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top