sql - Removing seconds from the time field in MS Access without updating the table -


good day

i have table has users , time-stamps. need calculate how many users used system @ given time. see peak hours. problem seconds separating count(s). instance, i'll have 4 of same time-stamps[11:45,11:45, 11:45] because different seconds. there way remove them without updating table. formatting functions don't work! in advance

the code follows;

select distinct mid(format (u.time), 1,5) time, (select count(u1.student_id) uselog u1 u1.time = u.time) users uselog u 

just round off seconds:

select distinct     timeserial(hour(u.time), minute(u.time), 0) [time],     (select count("*") uselog u1 timeserial(hour(u1.time), minute(u1.time), 0) = u.time) users       uselog u 

Comments

Popular posts from this blog

java - pagination of xlsx file to XSSFworkbook using apache POI -

Unlimited choices in BASH case statement -

apache - How do I stop my index.php being run twice for every user -