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 |
|
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2007-02-10 : 05:25:00
|
Hi, when I used getdate() fuction, its giving the correct time in this format 10/02/2007 01:04:31 PM. But I need the time in 24 hour format. Means it should be like 10/02/2007 13:04:31.How to get it. Please help me!!shaji |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-02-10 : 06:15:10
|
That's formatting issue. Do it in your front end application. You can also it it T-SQL using convert() but it is not advicable. KH |
 |
|
|
sqllover
Constraint Violating Yak Guru
338 Posts |
Posted - 2007-02-10 : 06:26:38
|
| hi shajimanjeri, take ur solution from this formatStyle Type0 or 100 mon dd yyyy hh:miAM (or PM)101 mm/dd/yy102 yy.mm.dd103 dd/mm/yy104 dd.mm.yy105 dd-mm-yy106 dd mon yy107 Mon dd, yy108 hh:mm:ss9 or 109 mon dd yyyy hh:mi:ss:mmmAM (or PM)110 mm-dd-yy111 yy/mm/dd112 yymmdd13 or 113 dd mon yyyy hh:mm:ss:mmm(24h)114 hh:mi:ss:mmm(24h)20 or 120 yyyy-mm-dd hh:mi:ss(24h)21 or 121 yyyy-mm-dd hh:mi:ss.mmm(24h)126 yyyy-mm-dd Thh:mm:ss.mmm(no spaces)130 dd mon yyyy hh:mi:ss:mmmAM131 dd/mm/yy hh:mi:ss:mmmAM |
 |
|
|
sqllover
Constraint Violating Yak Guru
338 Posts |
Posted - 2007-02-10 : 06:29:08
|
| hi shajimanjeri as mr.khtan told it is not right work to do in database.do it in front end. |
 |
|
|
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2007-02-10 : 07:00:25
|
Hi khtan, Sqllover,Thanx. Its working smoothly..Shaji quote: Originally posted by sqllover hi shajimanjeri as mr.khtan told it is not right work to do in database.do it in front end.
|
 |
|
|
shajimanjeri
Posting Yak Master
179 Posts |
Posted - 2007-02-10 : 07:00:32
|
Hi khtan, Sqllover,Thanx. Its working smoothly..Shaji quote: Originally posted by sqllover hi shajimanjeri as mr.khtan told it is not right work to do in database.do it in front end.
|
 |
|
|
|
|
|