September 28, 2012 at 9:16 am
I need to display time with timezone and date when executing the report.
I was trying with format but I did get the desired results.
It has to be displayed like "6:00:12 AM CST 2/2/2012"
Thank you
September 28, 2012 at 12:24 pm
chinni_16 (9/28/2012)
I need to display time with timezone and date when executing the report.I was trying with format but I did get the desired results.
It has to be displayed like "6:00:12 AM CST 2/2/2012"
Thank you
Formatting really should be done in the front end. If you absolutely MUST do this in sql you can do it but this type of specific formatting is kind of painful.
How do you know which timezone to use?
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
September 29, 2012 at 6:47 am
Thank you Sean
I am new to SSRS
I am trying to do in front end but not getting the desired result
The time zone is usually the time from when the report is executed.
So I was trying Format with Execution time.
The desired result should be 6.22 AM CST 08/08/2011
Thanks
September 29, 2012 at 11:55 am
The time zone is usually the time from when the report is executed.
I don't understand how this determines which time zone. To truly get the format in the way you specified you are going to have to use a mixture of date functions (DATEPART, DATENAME). You will probably have to cast that as varchar and do lots of ugly string manipulation. This is why I say your formatting should be done in the front end. SQL just isn't that good at string manipulation. Take a shot and if you get stuck I can help you out.
_______________________________________________________________
Need help? Help us help you.
Read the article at http://www.sqlservercentral.com/articles/Best+Practices/61537/ for best practices on asking questions.
Need to split a string? Try Jeff Modens splitter http://www.sqlservercentral.com/articles/Tally+Table/72993/.
Cross Tabs and Pivots, Part 1 – Converting Rows to Columns - http://www.sqlservercentral.com/articles/T-SQL/63681/
Cross Tabs and Pivots, Part 2 - Dynamic Cross Tabs - http://www.sqlservercentral.com/articles/Crosstab/65048/
Understanding and Using APPLY (Part 1) - http://www.sqlservercentral.com/articles/APPLY/69953/
Understanding and Using APPLY (Part 2) - http://www.sqlservercentral.com/articles/APPLY/69954/
Viewing 4 posts - 1 through 3 (of 3 total)
You must be logged in to reply to this topic. Login to reply