Click here to monitor SSC
SQLServerCentral is supported by Red Gate Software Ltd.
 
Log in  ::  Register  ::  Not logged in
 
 
 
        
Home       Members    Calendar    Who's On


Add to briefcase ««12345»»»

format date within reporting services Expand / Collapse
Author
Message
Posted Friday, November 21, 2008 9:11 AM
Mr or Mrs. 500

Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500Mr or Mrs. 500

Group: General Forum Members
Last Login: Thursday, December 18, 2014 6:40 AM
Points: 534, Visits: 1,043
= right(("0" + Cstr(Day(Fields!admdate.Value))),2) + "/" + right(("0" + Cstr(Month(Fields!admdate.Value))),2) + "/" + Cstr(Year(Fields!admdate.Value))

assume your date field name - admdate
Post #606620
Posted Thursday, June 11, 2009 8:54 AM
SSCrazy

SSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazySSCrazy

Group: General Forum Members
Last Login: 2 days ago @ 2:46 AM
Points: 2,528, Visits: 1,150
Hi,
I could set my format string in the property 'Format' like dd.MM.yyyy and get the correct German date format.
Rgds
Post #733087
Posted Monday, August 17, 2009 5:08 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Monday, October 4, 2010 12:03 PM
Points: 13, Visits: 22
Hi ,

you can Used this
=Format(Fields!myDate.Value, “MM/dd/yyyy”)
Post #771803
Posted Monday, August 17, 2009 5:23 AM


SSCertifiable

SSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiableSSCertifiable

Group: General Forum Members
Last Login: Friday, December 19, 2014 8:46 AM
Points: 5,676, Visits: 6,488
Apjchandresh, you're misunderstanding what they're asking for. The format is already MMDDYYYY. They're trying to reverse the day & the month so Day is listed first.


Brandie Tarvin, MCITP Database Administrator

Webpage: http://www.BrandieTarvin.net
LiveJournal Blog: http://brandietarvin.livejournal.com/
On LinkedIn!, Google+, and Twitter.

Freelance Writer: Shadowrun
Latchkeys: Nevermore, Latchkeys: The Bootleg War, and Latchkeys: Roscoes in the Night are now available on Nook and Kindle.
Post #771809
Posted Tuesday, September 22, 2009 6:21 PM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Sunday, July 24, 2011 8:54 PM
Points: 10, Visits: 102
has anyone made a 'cheat sheet' for formatting in SSRS? It would be very helpful as I find myself constantly googling date/time formats...

Something like: http://msdn.microsoft.com/en-us/library/73ctwf33.aspx

=Format(Fields!startdate.Value, "dd/mm/yy")

But refer to url for exact formatting

Cheers,
Ryan
Post #792288
Posted Thursday, September 24, 2009 5:33 AM


Ten Centuries

Ten CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen CenturiesTen Centuries

Group: General Forum Members
Last Login: Thursday, December 18, 2014 4:43 AM
Points: 1,187, Visits: 2,680
ryan121 (9/22/2009)
has anyone made a 'cheat sheet' for formatting in SSRS? ...


Like this perhaps?: http://john-sheehan.com/blog/wp-content/uploads/msnet-formatting-strings.pdf


--
Nigel
Useful Links:
How to post data/code on a forum to get the best help
The "Numbers" or "Tally" Table - Jeff Moden

Post #793174
Posted Friday, September 25, 2009 11:58 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Sunday, December 21, 2014 11:14 PM
Points: 648, Visits: 765
Ryan,
Would not work,
cause "mm" stands for minutes, not Months

if you have the need for the day first :
go to the filed expression
type : =format(fields!fieldname.value,"dd/MM/yyyy") , gives 19/11/2009
=format(fields!fieldname.value,"MM/dd/YYYY"), gives 11/19/2009
=format(fields!fieldname.value,"yyyy/dd/MM"), gives 2009/19/11
you can also change the / by - or : of whatever separator you want to use

Hopes this helps you a bit.
Wkr,
Eddy
Post #793994
Posted Sunday, January 17, 2010 3:51 AM
Grasshopper

GrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopperGrasshopper

Group: General Forum Members
Last Login: Saturday, June 12, 2010 9:31 AM
Points: 12, Visits: 14
Try this one. May helps.
http://praveenbattula.blogspot.com/2010/01/date-formatting-in-sql-server-reporting.html
Post #848837
Posted Wednesday, February 3, 2010 6:02 AM
SSC Rookie

SSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC RookieSSC Rookie

Group: General Forum Members
Last Login: Thursday, December 11, 2014 3:08 AM
Points: 39, Visits: 127
Use =FormatDateTime(Data Field Name,2) or =Format(Data Field Name,"mm/DD/yyyy").
Post #858560
Posted Wednesday, February 3, 2010 8:19 AM
SSChasing Mays

SSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing MaysSSChasing Mays

Group: General Forum Members
Last Login: Sunday, December 21, 2014 11:14 PM
Points: 648, Visits: 765
dssingh17-819020 (2/3/2010)
Use =FormatDateTime(Data Field Name,2) or =Format(Data Field Name,"mm/DD/yyyy").


No, impossible, cause lowercase 'mm' will give you minutes in stead of months
its just the mm that would have to be in uppercase and the dd have to be in lowercase

=format(datetimefield.value,"MM/dd/yyyy") = 11/20/2010
or in european format
=format(datetimefield.value,"dd/MM/yyyy") = 20/11/2010

wkr,
Eddy
Post #858723
« Prev Topic | Next Topic »

Add to briefcase ««12345»»»

Permissions Expand / Collapse