Is there a way to convert the input date into internal format without knowing the format it is in?
Input Date can be in below formats:
14977 ----internal format
2009-01-01
2009/01/01
01/01/2009
Irrespective of the input format my output should be 14977 (in the internal format)
Is this possible with OConv(IConv,xxxxx),xxxxxx) ?
Any help is much appreciated.
Convert Date to Internal Format
Moderators: chulett, rschirm, roy
Convert Date to Internal Format
Thanks,
RCil
RCil
See if this article helps. You need to get the component order correct and it can do the rest.
ps. Just use IConv - for internal format no OConv is needed since it does 'output' or 'external' format conversions.
ps. Just use IConv - for internal format no OConv is needed since it does 'output' or 'external' format conversions.
-craig
"You can never have too many knives" -- Logan Nine Fingers
"You can never have too many knives" -- Logan Nine Fingers
-
- Participant
- Posts: 54607
- Joined: Wed Oct 23, 2002 10:52 pm
- Location: Sydney, Australia
- Contact:
Yes it's possible but you'll need to:
- (a) use an If..Then..Else to determine whether the year is first or last (use Matches operator)
(b) use a business rule to resolve ambiguity about whether 01/02 is January 2nd or 1st February (for example)
IBM Software Services Group
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.
Any contribution to this forum is my own opinion and does not necessarily reflect any position that IBM may hold.