View previous topic :: View next topic
|
Author |
Message |
pravatsahu
New User
Joined: 07 Jan 2010 Posts: 1 Location: chennai
|
|
|
|
how to convert mmddyy to mmddyyyy |
|
Back to top |
|
|
Robert Sample
Global Moderator
Joined: 06 Jun 2008 Posts: 8696 Location: Dubuque, Iowa, USA
|
|
|
|
Click on the manuals link at the top of the page, find the COBOL Language Reference and Programming Guide manuals, and read up on date formats and MOVE statements until you can do it yourself.
Furthermore, you didn't specify anywhere near enough information to get realistic answers. If all the dates are this century, just add the digits 20 to the right place. If not, what are the rules -- what's the lowest date you'll see, for example? |
|
Back to top |
|
|
UmeySan
Active Member
Joined: 22 Aug 2006 Posts: 771 Location: Germany
|
|
|
|
Hi !
InnDate = mmddyy
OutDate = mmddhhyy
IF InDate_JJ GT '60' MOVE '19' to OutDate_HH
ELSE MOVE '20' to OutDate_HH |
|
Back to top |
|
|
dick scherrer
Moderator Emeritus
Joined: 23 Nov 2006 Posts: 19244 Location: Inside the Matrix
|
|
|
|
Hello,
Well, a possibility, but what about people born before 1960 (which is most of the "seniors" here )?
Hopefully the organization has rules about how to convert dates. . . |
|
Back to top |
|
|
PeterHolland
Global Moderator
Joined: 27 Oct 2009 Posts: 2481 Location: Netherlands, Amstelveen
|
|
|
|
dick scherrer wrote: |
Hello,
Well, a possibility, but what about people born before 1960 (which is most of the "seniors" here )?
Hopefully the organization has rules about how to convert dates. . . |
Sometimes i feel like im still in "the dark ages", reading (or try to undertsand) the questions here. |
|
Back to top |
|
|
Bill O'Boyle
CICS Moderator
Joined: 14 Jan 2008 Posts: 2501 Location: Atlanta, Georgia, USA
|
|
|
|
Language Environment offers Callable Service routines to query (and save if you'd like) the current default century (CEEQCEN) and alter this default century (CEESCEN) to the value of your choosing. You would then need to use the Callable Service routines that convert MMDDYY to MMDDYYYY format.
The default century window for Language Environment is set to start 80 years before the current system date.
If you choose to use this functionality, this is all documented in the LE manuals for your review.
Just another choice....
Bill |
|
Back to top |
|
|
|