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

Converting time format to seconds 1

Status
Not open for further replies.

merlynsdad

Programmer
Nov 18, 2010
175
US
I'm subtracting 8:57:33 AM from 6:33:18 PM in VBA and getting 0.399826388888889 in a field which is type double. I have to convert this to seconds. I've seen the conversions from seconds to time format, but I'm going the other way and don't know what the 0.39+ actually represents time wise, if anything. Any help would be appreciated.

If the square peg won't fit in the round hole, sand off the corners.
 
You can use the datediff function and specify an interval.

The value is fraction of a day so
.398 * (24 hours in a day) * (60 minutes in hour) * (60 seconds)
or 86400.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top