Hi All,
I need regex to validate the date format which needs to be in format "ddmmyycc'
where cc is century.
Thanks in advance.
Hi All,
I need regex to validate the date format which needs to be in format "ddmmyycc'
where cc is century.
Thanks in advance.
I am also looking first time.
Yes, 20065019 meaning June 20, 19
Here is one which I have created. Please have a look.
^(0[1-9]|[12][0-9]|3[01])(0[1-9]|1[012])\d\d(19|20)$
Thanks
That RegEx will allow 31029920 - or Feb 31st, 2099 ... Not something I think you want to allow.
I would take it in as a string, rearrange it to a normal date format, then let PDI parse it.
Formula step will rearrange the characters:LEFT([InStr];4)&RIGHT([InStr];2)&MID([InStr];5;2)
Then you can use Select Values to change the metadata from String to Date. It will then validate that the dates are really valid.
Last edited by gutlez; 10-06-2015 at 10:25 AM.
Copyright © 2005 - 2019 Hitachi Vantara Corporation. All Rights Reserved.