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 |
|
sqldev6363
Yak Posting Veteran
54 Posts |
Posted - 2011-10-19 : 11:12:32
|
| hi,I have a date field, need to display with time zone and AM/PM also.output should be like thisSample Result:10/14/2011 7:05:24 AM (ET)10/19/2011 4:50:34 AM (ET)Can anyone help me on this, thanks in advancedev |
|
|
Lamprey
Master Smack Fu Yak Hacker
4614 Posts |
Posted - 2011-10-19 : 12:56:12
|
| There is not a built-in function that I am aware of. But, you might be able to use of some of the date fuctions to determine the time zone offset and then display the time zone based on the offset. Here are some of the date functions you migh be able to use:- SYSDATETIME & SYSUTCDATE- GETDATE & GETUTCDATEOr possibly, you might be able to use the TZoffset: - SELECT DATEPART(TZoffset, SYSDATETIMEOFFSET()) |
 |
|
|
|
|
|