Wednesday, June 8, 2011

Crytal Reports Date Format custom 01st April 2011


I have to display date in following format  02nd May 2011 for achieving this :

right click on datefield click on format object
click on datetime tab then press customize button

  

write this formula  on highlighted formula editor

IF          DATEPART("d",{Nast_Sp_Multiple;1.empDOB}) IN [1,21,31]  THEN "st "
ELSE IF     DATEPART("d",{Nast_Sp_Multiple;1.empDOB}) IN [2,22]     THEN "nd "
ELSE IF     DATEPART("d",{Nast_Sp_Multiple;1.empDOB}) IN [3,23]     THEN "rd "
ELSE "th "

Now you will get date in following format 

01st December 1990
02nd May 2009




No comments:

Post a Comment

Postman beginner Tutorial

Hi , I have started new video series of postman tutorial hope it will be helpful:Please give me your feed back in comments and like and sub...