July 26, 2012 at 3:31 am
Hi,
Can someone tell me how to remove the slashes or dashes in my date field. For example I have date field 25/01/2003 and I want it to be 25012003 in my report.
Thanks.
July 26, 2012 at 5:35 am
Use a format expression around the date field
=Format(Fields!DateField.Value, "ddMMyyyy")
July 26, 2012 at 6:09 am
Wow. I used earlier =Format(Fields!DateField.Value, "ddmmyyyy") but it was'nt working but when I changed the mm to MM like you stipulated, it worked like a magic. I never knew that the wrong case will affect it.
--------------------------------------------------------------------------------
July 26, 2012 at 6:13 am
Yeah it is a pain that, but mm is minutes, MM is month.
So if we take the a usual standard date format in SQL it would look like this in the expression
yyyy-MM-dd hh:mm:ss
Very annoying if you have CAPS LOCK on and you do YYYY-MM-DD HH:MM:SS, you end up with the month in both the date and the time.
July 26, 2012 at 6:26 am
anthony.green (7/26/2012)
Yeah it is a pain that, but mm is minutes, MM is month.So if we take the a usual standard date format in SQL it would look like this in the expression
yyyy-MM-dd hh:mm:ss
Very annoying if you have CAPS LOCK on and you do YYYY-MM-DD HH:MM:SS, you end up with the month in both the date and the time.
Really it is very annoying
--rhythmk
------------------------------------------------------------------
To post your question use below link
https://www.sqlservercentral.com/articles/forum-etiquette-how-to-post-datacode-on-a-forum-to-get-the-best-help
Viewing 5 posts - 1 through 5 (of 5 total)
You must be logged in to reply to this topic. Login to reply
This website stores cookies on your computer.
These cookies are used to improve your website experience and provide more personalized services to you, both on this website and through other media.
To find out more about the cookies we use, see our Privacy Policy