Click here to Skip to main content
12,512,548 members (29,187 online)
Click here to Skip to main content
Add your own
alternative version

Stats

3.6K views
1 bookmarked
Posted

Adding Time in HH:MM Format - Useful SQL Query

, 10 Feb 2012 CPOL
Rate this:
Please Sign up or sign in to vote.
select aday, code, convert(varchar(5), min(atime), (108))MinTime, convert(varchar(5), max(atime),(108)) MaxTime from testgroup by aday,codeorder by aday asc
select aday, code, convert(varchar(5), min(atime), (108))MinTime, convert(varchar(5), max(atime),(108)) MaxTime
 
 from test
 
group by aday,code
order by aday asc

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

Share

About the Author

abdul sami
Unknown
No Biography provided

You may also be interested in...

Comments and Discussions

 
-- There are no messages in this forum --
| Advertise | Privacy | Terms of Use | Mobile
Web02 | 2.8.160929.1 | Last Updated 10 Feb 2012
Article Copyright 2012 by abdul sami
Everything else Copyright © CodeProject, 1999-2016
Layout: fixed | fluid