Question

How do you add minutes to a DATETIME field?

08/12/2013 11:00:00 PM + 120 minutes
Was it helpful?

Solution

You can just use the add (+) symbol but the value is added in seconds.
120 minutes is 7200 seconds.

NewDateTime = OldDateTime + 7200

Or, for coding clarity as pointed out by Tamar:

NewDateTime = OldDateTime + (120 * 60)
Licensed under: CC-BY-SA with attribution
Not affiliated with StackOverflow
scroll top