Page 1 of 1

How can I get the current date in the format dd.mm.jjjj

PostPosted: Mon Feb 10, 2014 4:35 pm
by sascha_wob
Hi volks,

how can I get the current date in the format dd.mm.jjjj in a INREC sort statement?
At the following statements I've tried to get the date starting at column 94:

94:DATE1(.), --> 2014.02.10 (wrong placements)

94:DATE=(DMY.), --> 10.02.14 (but the year ist only 2 digits long - it must be 4 digits.

It would be helpful if I can extract those parts from the current date, too:

dd
mm
yyyy

So I can put it with a c'.' together ;)

Have anybody an idea how I can solve the problem without doing 2 sort steps?

Thank you for your help!

Kind regards

Sascha

Re: How can I get the current date in the format dd.mm.jjjj

PostPosted: Mon Feb 10, 2014 11:21 pm
by skolusu
sascha,

94:DATE=(DM4.)


will give you the date as dd.mm.ccyy format

Re: How can I get the current date in the format dd.mm.jjjj

PostPosted: Tue Feb 11, 2014 1:03 am
by sascha_wob
Super! That works fine! Thanks a lot!
Best regards
Sascha