Reputation: 6508
How can I convert date format MM-DD-YY
to MM-dd-yyyy
?
For example:
CurrentDate is 11-30-15
- (MM-DD-YY)
Expected output is 11-30-2015
- (MM-dd-yyyy)
I want to set Expression
to for this date value in format MM-dd-yyyy
I tried below but not worked for me,
=Format(Fields!CurrentDate.Value, "MM-dd-yyyy")
Note: I do not want to convert it into MM-dd-yyyy
from Stored Procedure
.
Upvotes: 0
Views: 1184
Reputation: 6508
As CurrentDate
was a string
, not a date
so I need to convert it to a date first, then formatted it and worked fine now.
=Format(CDate(Fields!CurrentDate.Value), "MM/dd/yyyy")
Thanks you so much for your views.
Upvotes: 4