Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations strongm on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

How to convert varchar to time? 2

Status
Not open for further replies.

dgillz

Instructor
Mar 2, 2001
10,037
1
38
US
I have start and end times that are stored as varchar such as "0700", "1600", etc. How do I convert these to time?

Macola and Sage 50/Sage 100 Consultant

Check out our Macola tools:
 
Using the STUFF function, for example

Code:
SELECT CAST(STUFF('0700',3,0,':') as time)

Chriss
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top