Focal Point Banner
Community Center Education Summit Technical Support User Groups
Let's Get Social!

Facebook Twitter LinkedIn YouTube
Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Date Migrator Date Issue
Go
New
Search
Notify
Tools
Reply
  
Date Migrator Date Issue
 Login/Join
 
Gold member
posted
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)
 
Posts: 69 | Registered: March 11, 2010Reply With QuoteReport This Post
Virtuoso
posted Hide Post
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
 
Posts: 1087 | Location: Toronto, Ontario | Registered: May 26, 2004Reply With QuoteReport This Post
Gold member
posted Hide Post
It worked. Thanks.


WebFOCUS 7.6.10
Windows
all output (Excel, HTML, PDF)
 
Posts: 69 | Registered: March 11, 2010Reply With QuoteReport This Post
Guru
posted Hide Post
Or even simpler:

D_NEW_DATE/A8YYMD = EDIT(OLD_DATE,'9999$99$99')
 
Posts: 373 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
  Powered by Social Strata  
 

Focal Point    Focal Point Forums  Hop To Forum Categories  iWay Software Product Forum on Focal Point    Date Migrator Date Issue

Copyright © 1996-2018 Information Builders, leaders in enterprise business intelligence.