Focal Point
Date Migrator Date Issue

This topic can be found at:
https://forums.informationbuilders.com/eve/forums/a/tpc/f/1381057331/m/9047059006

March 25, 2011, 06:24 PM
texgator
Date Migrator Date Issue
I have a table (T1) in SQL server to which I populated through DMC and it has a date field in format YYMD. I am trying to append data to this table but from a different source (DB2 table - T2). I am able to get the date field in T2 in either alphanumeric format (YYYY/MM/DD) or decimal (99999999) but when I try to append it to T1, I get a format error on the date field. Can anyone suggest how to fix this? Thanks.


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
March 28, 2011, 10:07 AM
dhagen
For the decimal value (assuming that it is yyyymmdd format), change the USAGE attribute in the metadata to I8YYMD. This tells DMC that this is actually a date and to treat it accordingly.

For the string, if the slashes are not part of the value, then you can change the USAGE attribute in the metadata to A8YYMD. Like the above decimal, DMC will treat this as a date. If the slashes are part of the value, then you will have to create a source transformation to remove them and redefine the result as a date. Example:

D_NEW_DATE/A8YYMD = EDIT(OLD_DATE,'9999') || EDIT(OLD_DATE,'$$$$$99') || EDIT(OLD_DATE,'$$$$$$$$99')


"There is no limit to what you can achieve ... if you don’t care who gets the credit." Roger Abbott
March 28, 2011, 06:17 PM
texgator
It worked. Thanks.


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
March 29, 2011, 09:58 AM
Clif
Or even simpler:

D_NEW_DATE/A8YYMD = EDIT(OLD_DATE,'9999$99$99')


N/A