Hello,
How can I change a date format from 04/18/2005 to 04/18/05 so that the year is only two digits and not four? I am also trying to make sure that the end of date is always a Wednesday. By using my formulas below I get an extra zero in the date range if the date already has two digits. For example, 12/31/2004 becomes 012/031/00.
I have tried the following:
@MM Formula:
if len (totext(Month ({dailysummaryeod.EODDATE})))=2
then totext(Month ({dailysummaryeod.EODDATE}))
else "0" + totext(Month ({dailysummaryeod.EODDATE}))
@DD Formula:
if len(totext(Day({dailysummaryeod.EODDATE})))=2
then totext(Day({dailysummaryeod.EODDATE}))
else "0" + totext(Day({dailysummaryeod.EODDATE}))
@YY:
if len(totext(Year({dailysummaryeod.EODDATE})))=2
then totext(Year({dailysummaryeod.EODDATE}))
else "0" + totext(Year({dailysummaryeod.EODDATE}))
@MMDDYY:This is the formula that I actually put in the report.
left({@MM},(len({@MM})-3) )
+
left({@DD},(len({@DD})-3) )
+
mid({@YY},4, 2 )
Thank you,
Kbfnet
How can I change a date format from 04/18/2005 to 04/18/05 so that the year is only two digits and not four? I am also trying to make sure that the end of date is always a Wednesday. By using my formulas below I get an extra zero in the date range if the date already has two digits. For example, 12/31/2004 becomes 012/031/00.
I have tried the following:
@MM Formula:
if len (totext(Month ({dailysummaryeod.EODDATE})))=2
then totext(Month ({dailysummaryeod.EODDATE}))
else "0" + totext(Month ({dailysummaryeod.EODDATE}))
@DD Formula:
if len(totext(Day({dailysummaryeod.EODDATE})))=2
then totext(Day({dailysummaryeod.EODDATE}))
else "0" + totext(Day({dailysummaryeod.EODDATE}))
@YY:
if len(totext(Year({dailysummaryeod.EODDATE})))=2
then totext(Year({dailysummaryeod.EODDATE}))
else "0" + totext(Year({dailysummaryeod.EODDATE}))
@MMDDYY:This is the formula that I actually put in the report.
left({@MM},(len({@MM})-3) )
+
left({@DD},(len({@DD})-3) )
+
mid({@YY},4, 2 )
Thank you,
Kbfnet