Quantcast
Channel: SCN : All Content - All Communities
Viewing all articles
Browse latest Browse all 3523

display date 21st august 2015

$
0
0

data : ddate type d,

           month(2) type n ,

            year(4) type c ,

            date(2) type n ,

            field(2) type c .

 

ddate = '20150920'.

ddate = ddate -190 .

month = ddate + 4(2) .

date = ddate + 6(2)

year = ddate + 0(4)

 

  if ddate = '01 ' or ddate = '21' or ddate = '31' .

      field = 'st'

   write field .

 

elseif ddate = '2' or ddate = '22'

   field ='nd '

write field

 

elseif ddate = '3' or ddate = '23 '

     field = ' rd'

write field

 

else field = 'th '

  write field .

 

endif .

 

 

output 22  09 2015

 

but i m not getting nd with 22 .....its not entering into loop ..


Viewing all articles
Browse latest Browse all 3523

Trending Articles