Two different Date format

Previous topic - Next topic

kasim

I have one report which has two different date format for a single field
in some pages date format is dd/mm/yy and in some pages its dd-MMM-yy.
I configured report for dd/mm/yy. so for other format loading is failed.

Anyone has idea how can i store two different date format in one field.

(I know , we can store as String, But i want to store as date type)

Alessandro Perucchi

Hello Kasim,

If you want to store in a single date field 2 different date format, you simply cannot. Per field is only 1 date format allowed.

BUT... by being a little creative :-D there is a way around it!!

At my knowledge, there are several methods:

1) You create a script to change the date in the document itself before loading it.
2) You write a user exit in arsload, in order to change "on-the-fly" the date format used in the document while doing the process to archive the document.
3) you use 2 applications, one for the format 1, and the second for the format 2.

Maybe others have some ideas... but these are the 3 that comes in my mind in 2 seconds !!

Sincerely yours,
Alessandro
Alessandro Perucchi

#Install #Migrations #Conversion #Educate #Repair #Upgrade #Migrate #Enhance #Optimize #AIX #Linux #Multiplatforms #DB2 #Windows #Oracle #TSM #Tivoli #Performance #Audits #Customizing #Availability #HA #DR #JavaApi #ContentNavigator #ICN #WEBi #ODWEK #Services #PDF #AFP #XML

kasim

Hi Alessandro

Thanks for reply

Customer is not allowing to change the data.
Creating two applications also is not practical in our scenario.

We decided to store date value as String.

ewirtz

Hi Kasim,

using an index exit you can normalise the date field.

But of course it's better to speak with the producer of the report to generate only one format.

regards


Egon


Stephen McNulty

Kasim

if you store the date as a string, if you haven't you should also store the date you load the report as a date field to use as your segment date.
#ISERIES #ODWEK #XML