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    Ways to trap for a bad date in Data Migrator?
Go
New
Search
Notify
Tools
Reply
  
Ways to trap for a bad date in Data Migrator?
 Login/Join
 
Member
posted
We are pulling data from a Unidata system. One of the data fields is student's birth date. My challenge is that we have some birth dates that are wrong in our transactional system and Data Migrator does not like them (i.e., 10/21/0825). I was thinking one way to handle this is to check to see if the date is valid and if it is pull it into my Student Dimension. If it is not valid, I will transfer in a null value. Also, our transactional system for some reason is seeing these strange dates as "valid".

My question for the group is, do you know of a way to check for a "valid" date format? Or, do you have any other suggestions on how I might handle this?

Also, we are currently at 7.6.10 but are upgrading our system on Thursday, May 5 to 7.7.2.


Web focus release 7.6.7 on Linux
Multiple output formats used.
 
Posts: 5 | Location: Columbus Ohio | Registered: June 18, 2009Reply With QuoteReport This Post
Platinum Member
posted Hide Post
Hi Gayle,
The only approach I can think of would be to parse the date field into variables for MM(>0 <=12 taking into account months 2,4,6,9,& 11 are <31 days), DD[>0 <=31), and YYYY [if it doesnt start with 19 or 20) then use a java_script routine to check each of these variables. If they do not fail on the above conditions then concatenate them back together for display purposes. It would be nice if webFOCUS had an ISDATE function to verify it is indeed a "true" date.


WebFOCUS 7.6.9

Reporting client Windows 2003 Service pack 2 using IIS and TomCat 5.5
Reporting Server OS/400 V5R4M0
Outputs: HTML, Excel, PDF, CSV, and Flat Files
 
Posts: 130 | Location: Columbus, Ohio | Registered: February 25, 2009Reply With QuoteReport This Post
Guru
posted Hide Post
It depends on how bad the dates can be. If the slashes are always going to be there you can remove them with EDIT, and then use DATECVT to convert the date to your desired format.

DATECVT( EDIT (INDATE, '99$99$9999') , 'A8MDYY', 'MDYY' )

This returns a blank for invalid date which you can convert to MISSING to insert a NULL.
 
Posts: 380 | Location: New York City | Registered: May 03, 2007Reply With QuoteReport This Post
Member
posted Hide Post
I think both of these suggestions will work. I'll try them out this afternoon.

Thank you so much!


Web focus release 7.6.7 on Linux
Multiple output formats used.
 
Posts: 5 | Location: Columbus Ohio | Registered: June 18, 2009Reply With QuoteReport This Post
Virtuoso
posted Hide Post
Prior ro using DATECVT, as Clif suggests, you might use the CHKFMT function to ensure the incoming date has slashes in the correct places and all numbers otherwise:

DATE_CHECK/I3 = CHKFMT(10,INDATE,'99/99/9999','I3');
BIRTH_DATE/MDYY MISSING ON = IF (DATE_CHECK NE 0) THEN '' ELSE DATECVT(EDIT(INDATE,'99$99$9999'),'A8MDYY','MDYY');


WebFOCUS 7.7.05
 
Posts: 1213 | Location: Seattle, Washington - USA | Registered: October 22, 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    Ways to trap for a bad date in Data Migrator?

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