Connecting Tech Pros Worldwide Forums | Help | Site Map

Round Time to Nearest Second

Member
 
Join Date: Feb 2007
Posts: 121
#1: May 6 '07
I have a coupe of queries where I use the Time() function. Later I need to match these records to each other. But I have a certain situation where the queries are run on different records at barely different time (a few seconds apart). So the records end up not matching to each other. So I would like the function to round to the nearest minute so that they will still match. How do I do this?

I have tried format(tim(), "HHNN"). but I get no value that way.

any ideas on how to fix this?

missinglinq's Avatar
Moderator
 
Join Date: Nov 2006
Location: Richmond, Virginia USA
Posts: 3,000
#2: May 6 '07

re: Round Time to Nearest Second


It would probably help if you replaced tim() with time() ;0)>
JConsulting's Avatar
Expert
 
Join Date: Apr 2007
Location: Houston
Posts: 601
#3: May 6 '07

re: Round Time to Nearest Second


format(time(), "hh:nn")
Reply


Similar Microsoft Access / VBA bytes