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

Datetime()

Status
Not open for further replies.

Auguy

Programmer
May 1, 2004
1,206
US
Sorry for such a simple question. My memory must be failing and I need to update an old DOS 2.6 program and do not have my 2.6 manuals anymore and cannot find anything in the help files for Datetime(). Is there a function or SYS() that returns a value like Datetime() in VFP? ie:12/19/2006 03:11:18 PM

Auguy
Sylvania, Ohio
 
In One Word or Less.

Thanks

Auguy
Sylvania, Ohio
 
DTOC(DATE())+' '+TIME()
Qualifies as one word - no spaces
 
Thanks Cricket. Already thought of that, but it makes the processing that I want to do a little bit more difficult because it is a string. But, it will have to do.

Auguy
Sylvania, Ohio
 
Have a look at seconds() (or sys(2))
It returns the seconds since midnight.
To have it in hours:
? seconds()/3600
Combining this with date() calculation you can calculate with it.

Rob.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top