ASP - hour()

They have: 133 posts

Joined: Sep 2000

Hi,

I need a way to figure out which hour we are in; an integer from 1 > 24 or something of the like.
Can someone help me with this? I reallly hope so, since it is kinda crucial for me.

Thanks in advance.
~Casper Bang

Peter J. Boettcher's picture

They have: 812 posts

Joined: Feb 2000

Just use Hour(Now). I think it goes from 0 to 23, not from 1 to 24.

They have: 133 posts

Joined: Sep 2000

Thank you! Worked pefectly - as always Smiling
I knew there was a function called hour() but I didn't know I should put now in between Smiling

In case you didn't know... you can just add 1 to the hour(Now) and it will range from 1-24... Not that I needed it, but it is posibly to do taht as well.

You helped me a lot here!

~casper

Want to join the discussion? Create an account or log in if you already have one. Joining is fast, free and painless! We’ll even whisk you back here when you’ve finished.