Converting hrs and min to just min

C

carmen

I am using two fields on a form to capture time someboby is working. The
fields are hours and minutes. How can I when submitting to the db take both
fields and convert them to a single field in the db as minutes?

Thanks

Carmen
 
D

Dave Anderson

carmen said:
I am using two fields on a form to capture time someboby is working.
The fields are hours and minutes. How can I when submitting to the db
take both fields and convert them to a single field in the db as
minutes?

In SQL Server, the DB can do it for you:
SELECT DATEDIFF(mi,'0:00','2:30') --> 150


What could be easier?



--
Dave Anderson

Unsolicited commercial email will be read at a cost of $500 per message. Use
of this email address implies consent to these terms. Please do not contact
me directly or ask me to contact you directly for assistance. If your
question is worth asking, it's worth posting.
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Members online

No members online now.

Forum statistics

Threads
473,733
Messages
2,569,440
Members
44,830
Latest member
ZADIva7383

Latest Threads

Top