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 |
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-09-07 : 07:01:39
|
| Dear All,In report subscriptions , I am using @timestamp in my file names.It produces the file name with date and time.I just need the date, not time.Is any other options avaliable.eg:Just -> 2011_09_07Not -> 2011_09_07_100201Any help is highly appreciatedRegards,SG |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-07 : 07:03:57
|
| use dateadd(dd,datediff(dd,0,@timestamp),0)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
satheesh
Posting Yak Master
152 Posts |
Posted - 2011-09-07 : 07:21:03
|
| Thanks for your reply visakh.its not in script,i mean in SQL reporting servicesunder Report Delivery Option, i am using @timestamp in file name column.It produce file with date and time.for eg : 2011_09_07_100201.csvI just want to produce the file with only date ie.2011_09_07.csvThanks in advance.Regards,SG |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2011-09-09 : 02:42:23
|
| you can apply same logic. change the synatx as per definition of dateadd and datediff in reporting servicesDATEADD(DAY,DATEDIFF(DAY,#1/1/1900#,@timestamp),#1/1/1900#)------------------------------------------------------------------------------------------------------SQL Server MVPhttp://visakhm.blogspot.com/ |
 |
|
|
|
|
|
|
|