| | |
I just need TIME not Date.
Please support our MS SQL advertiser: Intel Parallel Studio Home
![]() |
•
•
Join Date: Nov 2005
Posts: 1
Reputation:
Solved Threads: 0
I'm working on a project that just needs to know that its 08:00 or 14:01. I dont need or want to store anything about date.
When I store the time and then try to check it against the current time I'm runnig into problems.
where (timeofevent = Convert(char(19),current_timestamp))
this doesnt work because Convert(char(19),current_timestamp
returns Nov 6 2005 6:39PM when what I need is 6:39PM or 18:39.
I need help getting the current time in that format.
THANKS!
When I store the time and then try to check it against the current time I'm runnig into problems.
where (timeofevent = Convert(char(19),current_timestamp))
this doesnt work because Convert(char(19),current_timestamp
returns Nov 6 2005 6:39PM when what I need is 6:39PM or 18:39.
I need help getting the current time in that format.
THANKS!
•
•
Join Date: Aug 2008
Posts: 6
Reputation:
Solved Threads: 1
Hello,
This expression give you only the time.
I hope this help you.
This expression give you only the time.
MS SQL Syntax (Toggle Plain Text)
CONVERT (varchar, GETDATE(), 114) -- this is the result -- 10:24:55:640
I hope this help you.
Last edited by AntonioGK; Aug 13th, 2008 at 2:28 pm. Reason: Add Result
![]() |
Similar Threads
- Getting time from system clock in nanoseconds (C++)
- Display client's PC Date & Time (ASP.NET)
- Convert time stamp to date using php (PHP)
- Time for a Clean Install of XP? (Windows tips 'n' tweaks)
- How to Get Last Accessed/Created/Modified File Date and Time (C)
- VBA Date Format (Visual Basic 4 / 5 / 6)
Other Threads in the MS SQL Forum
- Previous Thread: Reading logs in MS SQL Server 2000
- Next Thread: SQL Join query not working correctly
| Thread Tools | Search this Thread |





