Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations IamaSherpa on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Rounding the current time to next hour PLEASE HELP

Status
Not open for further replies.

THEJOESTER

Technical User
Jul 6, 2006
39
US
Hi, this database that I am making is for a train station that has runs on the hour. What I want is the code to make the current time (Time()) to be rounded to the next hour. Example: the time is 9:04, I need it to be rounded to 10:00. I need this so I can use it in queries so I dont have to keep going into the queries and changing the time value. Please Help. Much Appreciated.
 
Just want to point out that the stuff you have in the HAVING clause really belongs in the WHERE clause. Moving it should speed up your query considerably.

Tamar
 

Another revised and shorter version

? transform(val(time())+1%24,"@L 99:00:00")

Nasib
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top