Convert SQL Server Time - Using VB - TechRepublic
General discussion
August 10, 2001 at 03:07 AM
rsp05

Convert SQL Server Time – Using VB

by rsp05 . Updated 24 years, 9 months ago

Hi:

I have a problem trying to convert an integer stored in SQL Server which represents a time value. I am running a system stored proc (sp_help_job), and one of the colums is ‘next_run_date’. The time value is stored as, for ex., 112000, for 11:20:00.
Using the 24 hour time clock, and the all the chrs except the last two (don’t need the seconds), I am able to manipulate this into a readable time format. However, 12:00 AM, is represented not by 2400, but by a 0 (zero), and 12:01 AM is 100, 12:02 AM is 200, and so on. This logic is weird, and so I was wondering if there is a conversion function or way to make it consistent for any value? Can someone please help me? TIA..

This discussion is locked

All Comments