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 convert DATE() to INTERGER as in PHP

Status
Not open for further replies.

VictorFRodriguez

Programmer
Jan 20, 2001
51
0
0
DO
In php, you can convert today's date into interger by using the function var_today = date() which gives you the result of seconds from 1970 to today. What would be the function in VFP in order to obtain the same result?
 
You can look into your VFP Help file for how to use SYS(11)
It will give you the Julian Date for the desired date.
Then, if you need SECONDS, you can convert the Julian Date.

Good Luck
JRB-Bldr
 
As this is number of seconds, you use [tt]DATETIME()-DATETIME(1970,1,1,0,0,0)[/tt] for the current Unix time and, of course, just process any DateTime from data, inputs, etc. by subtractnig the 1st January 1970 midnight from it to get the seconds since then.

Bye, Olaf.

Olaf Doschke Software Engineering
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top