‎2007 Aug 06 6:20 PM
Hi Experts,
I dont know that How the User sends me the DATE format in flat file! I mean, some times, DD.MM.YYYY or MM/DD/YYYY or DDMMYYYY or MMDDYYYY, but I wanna to pass it as External format to CONVERT_DATE_INTERNAL to get the Internal format as YYYYMMDD.
So, How to chnage,
DD.MM.YYYY ---> DDMMYYYY
or MM/DD/YYYY -
>MMDDYYYY?
or some times, user sends as 8 CHARs only, with out specila chars!
(its is not recommended to use OFFSETTING)
thanq.
Message was edited by:
Srikhar
‎2007 Aug 06 7:18 PM
Sorry i did not read your message properly.
User should maintain date format properly in file it self,if not then
you need to write the logic before using FM.
Simple logic :
if data ca '/' .
do not write any logic
else.
here you need to use concatenate command
endif.
Thanks
Seshu
‎2007 Aug 06 6:26 PM
Hi Srikhar
Get the string length of the date field that user is sending using the function strlen(). If it is 8 chars no need to do anything, else you can use the edit mask option with the write statement with mask as '__ __ ____', then use condense option on that string with no-gaps addition. That should give the date without any special chars.
~Ranganath
‎2007 Aug 06 6:31 PM
Use FM - CONVERT_DATE_TO_INTERN_FORMAT
If you use above fm then it will convert into default user date format.
Let me know if i am wrong.
Thanks
Seshu
‎2007 Aug 06 7:18 PM
Sorry i did not read your message properly.
User should maintain date format properly in file it self,if not then
you need to write the logic before using FM.
Simple logic :
if data ca '/' .
do not write any logic
else.
here you need to use concatenate command
endif.
Thanks
Seshu