Hour Function

  • Updated

The Hour function returns the hour of the day for a given DateTime (0 to 23).

Syntax 1

 

The Hour function returns the hour of the day for a given DateTime (0 to 23).

 

Hour()

Syntax 2

 

The Hour function returns the hour of the day for a given DateTime (0 to 23).

 

Hour(dateTime)

 

 

Arguments:

 

 

 

dateTime

DateTime - A date-time.

Remarks

  • If a Date (not a DateTime) is passed, the function returns 0.
  • Example: Hour("2005-1-28") returns 0.
  • Example: Hour("2005-1-28T22:10:45") returns 22.

Was this article helpful?

0 out of 0 found this helpful

Comments

0 comments

Article is closed for comments.