Author Topic: Two different Date format  (Read 3084 times)

kasim

  • Guest
Two different Date format
« on: November 06, 2013, 05:11:27 AM »
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

  • Global Moderator
  • Hero Member
  • *****
  • Posts: 1002
    • View Profile
Re: Two different Date format
« Reply #1 on: November 08, 2013, 02:45:51 AM »
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

  • Guest
Re: Two different Date format
« Reply #2 on: November 08, 2013, 06:20:23 AM »
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

  • Full Member
  • ***
  • Posts: 134
    • View Profile
Re: Two different Date format
« Reply #3 on: November 08, 2013, 07:25:59 AM »
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

  • Jr. Member
  • **
  • Posts: 57
    • View Profile
Re: Two different Date format
« Reply #4 on: November 12, 2013, 11:33:14 AM »
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