Author |
Topic |
ashishkukreja
Starting Member
16 Posts |
Posted - 2007-09-24 : 01:50:03
|
I am creating a report in Business Intelligence Studiothere I am getting a problem is that, I have a one date column in format mm/dd/yyyy hh:mm, in my SQL Server TableI want to show it in my report in different format which is dd/mm/yyyy.What I have to do for thisAshish KukrejaYou Have to Loss Many Times to Win Single Time |
|
Kristen
Test
22859 Posts |
Posted - 2007-09-24 : 02:00:46
|
"I have a one date column in format mm/dd/yyyy hh:mm, in my SQL Server Table"If its stored in a DATETIME datatype column then it doesn't have a format, its a native date + time object, and you can format it however you like.If it isn't stored in a DATETIME column then it should be! but you will have to convert it to datetime, and then format it appropriatelyAs you;ve posted this in the Reporting Services forum I presume you are using that for your output, so within that there are formatting functions [which I'm not familiar with, sorry].See also: http://www.sqlteam.com/forums/topic.asp?TOPIC_ID=55210&SearchTerms=Date%20formatting,Format%20DateKristen |
 |
|
madhivanan
Premature Yak Congratulator
22864 Posts |
|
angela2137
Starting Member
2 Posts |
Posted - 2007-09-27 : 14:47:55
|
Select the field you want formatted, properites, format tab and select the elicpse ..., select the format you want. Hope this is what you were looking for. |
 |
|
jdGONEMAD
Starting Member
2 Posts |
Posted - 2007-09-27 : 20:02:57
|
try this in the expression:=FormatDateTime(Fields!birthday.value, 2)change 2 for the format. try 1-5 (not sure how many formats are there) |
 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-10-09 : 09:45:21
|
hi, when I try this I get errors on dates if dd > 12.I think this is because my date field displays records like dd/mm/yyyy . is the above only available to use with american dates ? |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-10-09 : 09:47:49
|
Sounds like its thinking your data's Day is its Month and vice versa.That won't happen if the original is in a DATETIME datatype.What datatype is the data you coming FROM ?Kristen |
 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-10-09 : 10:02:34
|
hi Kristen,looks like my dates are displayed as US in the table.is it possible to convert them from us to uk as datetime then format ? |
 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-10-09 : 10:04:17
|
actually, fro mthe data tab, If I execute the query the data is displayed correctly ! ie, dd/mm/yyyy 00:00:00 . |
 |
|
jamie
Aged Yak Warrior
542 Posts |
Posted - 2007-10-09 : 10:06:21
|
ignore this, I'm being an idiot ! thursday , may 03, 2007 is 03/05/2007 ! Is there a way of changing that around so it says thursday 03 May 2007 ?! |
 |
|
Kristen
Test
22859 Posts |
Posted - 2007-10-09 : 10:20:14
|
CONVERT(varchar(24), SomeDateColumn, 113) or maybe 103, I forget, but its in Books Online under CONVERT.There isn't a format that will give you the Day Name in one-strike IIRCYou should format in the front end application, rather than having SQL Server convert a nice date/time datatype into a text string ...Kristen |
 |
|
|