Last post Aug 03, 2011 03:53 AM by Raaghav123
Contributor
2633 Points
1770 Posts
Mar 07, 2011 12:37 AM|Rameezwaheed|LINK
HI all,
I have the below format of the Date in sql server 2010-07-14 11:49:27.000 and i want to display the date in format MMM dd, yyyy 11:49 AM on the report i tried the below but it is giving the out put like ' 14 July 2007 12:00AM
=CDate(First(Fields!CreatedDate.Value)).ToString("MMM dd, yyyy hh:mm tt")
How i solve this.
Regards
Member
740 Points
236 Posts
Mar 07, 2011 01:01 AM|Rakeshkr|LINK
Hi,
check this reply
http://forums.asp.net/t/1375361.aspx/1?Report+Design+rdlc+how+to+format+a+date+string
Mar 07, 2011 01:18 AM|Rameezwaheed|LINK
Thanks for reply
I tried the below
=CDate(First(Fields!CreatedDate.Value)).ToString("MMM dd, yyyy hh:mm:ss tt")
it always shows the wrong time like below
Jul 12, 2010 12:00:00 AM
In all record it show the 12:00:00 AM time how i set it ???
Mar 07, 2011 01:31 AM|Rakeshkr|LINK
<div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; width: 100%; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; margin: 8px;">
check date datatype in database and as well as values is stored in correct way or not (means hour and min stored or not)?
Mar 07, 2011 01:49 AM|Rameezwaheed|LINK
Thanks for reply.
the date format "MM/dd/yyyy hh:mm tt" worked for me
Thanks
None
0 Points
2 Posts
Aug 03, 2011 03:53 AM|Raaghav123|LINK
Thanks a lot...
It helped me :)
Contributor
2633 Points
1770 Posts
Formatting Date in RDLC
Mar 07, 2011 12:37 AM|Rameezwaheed|LINK
HI all,
I have the below format of the Date in sql server 2010-07-14 11:49:27.000 and i want to display the date in format MMM dd, yyyy 11:49 AM on the report i tried the below but it is giving the out put like ' 14 July 2007 12:00AM
=CDate(First(Fields!CreatedDate.Value)).ToString("MMM dd, yyyy hh:mm tt")
How i solve this.
Regards
Mark as an answer if it helps
Member
740 Points
236 Posts
Re: Formatting Date in RDLC
Mar 07, 2011 01:01 AM|Rakeshkr|LINK
Hi,
check this reply
http://forums.asp.net/t/1375361.aspx/1?Report+Design+rdlc+how+to+format+a+date+string
---------------------------------------
Mark as Answer, if it answers you
Contributor
2633 Points
1770 Posts
Re: Formatting Date in RDLC
Mar 07, 2011 01:18 AM|Rameezwaheed|LINK
Thanks for reply
I tried the below
=CDate(First(Fields!CreatedDate.Value)).ToString("MMM dd, yyyy hh:mm:ss tt")
it always shows the wrong time like below
Jul 12, 2010 12:00:00 AM
In all record it show the 12:00:00 AM time how i set it ???
Regards
Mark as an answer if it helps
Contributor
2633 Points
1770 Posts
Re: Formatting Date in RDLC
Mar 07, 2011 01:18 AM|Rameezwaheed|LINK
Thanks for reply
I tried the below
=CDate(First(Fields!CreatedDate.Value)).ToString("MMM dd, yyyy hh:mm:ss tt")
it always shows the wrong time like below
Jul 12, 2010 12:00:00 AM
In all record it show the 12:00:00 AM time how i set it ???
Regards
Mark as an answer if it helps
Member
740 Points
236 Posts
Re: Formatting Date in RDLC
Mar 07, 2011 01:31 AM|Rakeshkr|LINK
<div style="color: #000000; font-family: Verdana, Arial, Helvetica, sans-serif; font-size: 10px; width: 100%; background-image: initial; background-attachment: initial; background-origin: initial; background-clip: initial; background-color: #ffffff; margin: 8px;">
Hi,
check date datatype in database and as well as values is stored in correct way or not (means hour and min stored or not)?
</div>---------------------------------------
Mark as Answer, if it answers you
Contributor
2633 Points
1770 Posts
Re: Formatting Date in RDLC
Mar 07, 2011 01:49 AM|Rameezwaheed|LINK
Thanks for reply.
the date format "MM/dd/yyyy hh:mm tt" worked for me
Thanks
Regards
Mark as an answer if it helps
None
0 Points
2 Posts
Re: Formatting Date in RDLC
Aug 03, 2011 03:53 AM|Raaghav123|LINK
Thanks a lot...
It helped me :)