AddHours Function

  • Updated

The AddHours function adds a specified number of hours to a DateTime value.

Syntax

 

The AddHours function adds a specified number of hours to a DateTime value.

 

AddHours(dateTime, numHours)

 

 

Arguments:

 

 

 

dateTime

DateTime - The base date and time.

 

 

numHours

Integer - The number of hours to add. A negative value will subtract hours.

Remarks

  • Example: AddHours("2005-1-28T11:00:00", 10) returns 2005-1-28T21:00:00.
  • Example: AddHours("2005-1-28T11:00:00", -10) returns 2005-1-28T1:00:00.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.