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

convert datetime to integer

Status
Not open for further replies.

sodakotahusker

Programmer
Mar 15, 2001
601
I have a vendor supplied database which keeps track of phone calls. It has a date time field which contains the number of seconds involved in the call. How can I convert that datetime to an integer - easily - without converting to string and then picking the parts of the string out to calculate the seconds?
Perhaps there is no way? I've been my head against a wall for an hour.
 
Something like this?

Code:
 Hour(TimeCol) * 3600 + Minute(TimeCol) * 60 + Second(TimeCol)

Hope it helps,

Alex

Ignorance of certain subjects is a great part of wisdom
 
mayhap an example of what you get and what you would expect to be able to transmorgify it to would be helpful?




MichaelRed


 
Alex - this worked perfectly. Thank you very much! I was not aware of these functions. You have added to my repetoire and I appreciate it!!
Don
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top