Jump to content
Sign in to follow this  
robhunter

@HOUR -1

Recommended Posts

robhunter

Hello,

I need to set the @HOUR parameter to my actual computer time -1 (so at 23:00 it's 22:00) but I have a problem, when it is 00:00 it says it's -1:00...

How can set this option?

Thanks in advice

Share this post


Link to post
Share on other sites
smartee

Or simply :)

$iHour = Mod((@HOUR + 23), 24)

Share this post


Link to post
Share on other sites
timbo

Or simply :)

$iHour = Mod((@HOUR + 23), 24)

I like it! I've been using my way (subtracting hours, minutes, seconds) for years thinking that there had to be a better way (without using "_date" functions), now I know...

-Timbo

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×