Pregunta

How do you add minutes to a DATETIME field?

08/12/2013 11:00:00 PM + 120 minutes
¿Fue útil?

Solución

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)
Licenciado bajo: CC-BY-SA con atribución
No afiliado a StackOverflow
scroll top