Convert CurrentDate into a Date code format

Printed From: Crystal Reports Book — Forum Name: Technical Questions

Hello Everyone,

One of my suppliers is requesting the date (currentDate) to be in the following format:

22A3 <-- (the actual date is January 22nd / 2003)

*22 is the day (2 digits)

*The A is a code for the month (Jan=A, Feb=B, March=C, April=D, May=E, June=F, July=G, August=H, Sept=I, Oct=J, Nov=K, Dec=L)

*The 3 is the fourth digit in the year.


What formula do I need to write to accomplish this?


Thank you and Best regards
Basel
here is one way

TOTEXT(TODAY,"dd")+
(if month(today)=1 then 'A' else
if month(today)=2 then 'B' else
if month(today)=1 then 'C' else
if month(today)=4 then 'D' else
if month(today)=5 then 'E' else
if month(today)=6 then 'F' else
if month(today)=7 then 'G' else
if month(today)=8 then 'H' else
if month(today)=9 then 'I' else
if month(today)=10 then 'J' else
if month(today)=11 then 'K' else
if month(today)=12 then 'L')
+ right(totext(today,"yy"),1)
@DBlank

Thank you so much. it worked! much appreciated!