Hi Everybody,
Does anyone know of a formula to calculate a Date and Time based on elapsed time in seconds from a certain date.
ie: The date is Jan 01 1990, Elapsed time in seconds from midnight of that date would be 572778954.
How would I get the date time of the above?
Time / Date Calculation
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
Time / Date Calculation
Thanks,
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Jeff Barnes
(FWH 12.01, xHarbour 1.2.1, Bcc582)
Hello Jeff
I got all needed functions of data and time calculations
They are some at : http://www.pflegeplus.com/fivewin
I must look in my archiv, if this function is included
otherwise i put it in the forum
Regards
Uwe
They are some at : http://www.pflegeplus.com/fivewin
I must look in my archiv, if this function is included
otherwise i put it in the forum
Regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Jeff,
this code should work
this code should work
Code: Select all
nSec := 572778954 // eleapsed seconds
nDays := Int (nSec/86400) // get the days, 1 day = 86400 secs
nMod := nSec%86400 // get the rest
nHours := Int (nMod/3600) // get the hours, 1 hour = 3600 secs
nMin := Int ((nMod%3600)/60) // get the minutes
dToday := Date ()
dDate := dToday - nDays
cTime := StrZero(nHours,2,0)+":"+StrZero(nMin,2,0)
kind regards
Stefan
Stefan
Date / Time
Hello Stefan,
did you have look at my Topic Date / Time => Elapsed-Function ?
With this function you have some more informations.
Regards
Uwe
did you have look at my Topic Date / Time => Elapsed-Function ?
With this function you have some more informations.
Regards
Uwe
Since 1995 ( the first release of FW 1.9 )
i work with FW.
If you have any questions about special functions, maybe i can help.
i work with FW.
If you have any questions about special functions, maybe i can help.
- Jeff Barnes
- Posts: 912
- Joined: Sun Oct 09, 2005 1:05 pm
- Location: Ontario, Canada
- Contact:
-
- Posts: 824
- Joined: Thu Oct 13, 2005 7:39 am
- Location: Germany
Re: Date / Time
Hi Uwe,
not yet, but i´ll do itukoenig wrote: did you have look at my Topic Date / Time => Elapsed-Function ?
With this function you have some more informations.
kind regards
Stefan
Stefan