Date format in crystal report

epicor

(Mark Rowley) #1

crystal report date format change…

hi guys, i’ve been asked to change a date format which appears dd-mm-yyyy to “10-Jan-2019” format.

On the 2nd screenshot, i need Box B to be the same format as box A.
when i right click to edit formula it shows this pop up box…i think the field is a calculated text string, so how can i adjust it to the new format?

image

Many thanks in advance.


(Steve Erboe) #2

Try ToText(CDate({TableName.FieldName}), “dd-MMM-yyyy”)


(Steve Erboe) #3

ToText(CDate({TableName.FieldName}), “dd-MMM-yyyy”)


(Mark Rowley) #4

There is no table/field name…it’s just a label string that I think returns the current date


(Steve Erboe) #5

Try

ToText(CDate(CurrentDate), “dd-MMM-yyyy”)


(Mark Rowley) #6

this did the trick…

if {POHeader.PrintAs} = ‘C’ then ToText ((CurrentDate),“dd-MMM-yyyy”) else ‘’

thank you for your help