SQL Server Forums
Profile | Register | Active Topics | Members | Search | Forum FAQ
 
Register Now and get your question answered!
Username:
Password:
Save Password
Forgot your Password?

 All Forums
 SQL Server 2008 Forums
 Transact-SQL (2008)
 Convert Number to Time
 New Topic  Reply to Topic
 Printer Friendly
Author Previous Topic Topic Next Topic  

Gerald30
Starting Member

Philippines
49 Posts

Posted - 07/06/2013 :  00:03:48  Show Profile  Reply with Quote
Hello,

Good Day.

Kindly Help me Please....

How can I convert a 4 digit Integer into Time(HH:mm) ?

Thanks in advance.

khtan
In (Som, Ni, Yak)

Singapore
17681 Posts

Posted - 07/06/2013 :  00:09:16  Show Profile  Reply with Quote
how does the 4 digits integer looks like ? and what time does it represent ?


KH
Time is always against us

Go to Top of Page

Gerald30
Starting Member

Philippines
49 Posts

Posted - 07/06/2013 :  00:13:33  Show Profile  Reply with Quote


ah it represent 24hr time.

Samples are 1930 and 0705
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17681 Posts

Posted - 07/06/2013 :  00:33:09  Show Profile  Reply with Quote
stuff(convert(varchar(10), 1930), 3, 0, ':')



KH
Time is always against us

Go to Top of Page

Gerald30
Starting Member

Philippines
49 Posts

Posted - 07/06/2013 :  00:39:55  Show Profile  Reply with Quote
Thanks a Lot Sir...
Go to Top of Page

khtan
In (Som, Ni, Yak)

Singapore
17681 Posts

Posted - 07/06/2013 :  01:48:01  Show Profile  Reply with Quote
welcome


KH
Time is always against us

Go to Top of Page
  Previous Topic Topic Next Topic  
 New Topic  Reply to Topic
 Printer Friendly
Jump To:
SQL Server Forums © 2000-2009 SQLTeam Publishing, LLC Go To Top Of Page
This page was generated in 0.05 seconds. Powered By: Snitz Forums 2000