Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
| Author |
Topic |
|
harshad
Starting Member
1 Post |
Posted - 2008-11-13 : 07:21:34
|
| hi i want to convet time which is not in proper formatplease tell the way to do iti have 5.90 which means 6.30here we need to convert .90 to 1.30 please how to do thatthanks in advance |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-13 : 07:25:27
|
5.90 is 5 hours 90 minutes? Which is 6 hours 30 minutes?0.90 is 0 hours 90 minutes? Which is 1 hour 30 minutes? E 12°55'05.63"N 56°04'39.26" |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2008-11-13 : 07:28:10
|
[code]DECLARE @Sample TABLE ( data SMALLMONEY )INSERT @SampleSELECT 5.90 UNION ALLSELECT .90SELECT data, CONVERT(CHAR(5), DATEADD(MINUTE, FLOOR(data) * 60 + 100 * data % 100, 0), 108)FROM @Sample[/code] E 12°55'05.63"N 56°04'39.26" |
 |
|
|
|
|
|