Convert Filed to date using a mask inputted by user
Forums
Good morning,
I am trying to convert CHAR fields to DATE but I don't want to hadrwire the mask in the equation.
I have tried to wirte concatenate the variable with three and two "" but the result is the same.
Is there a way to let this work in this way? I am almost done with the macro and this is the last bit.
The bit coded is attached, thank you very much for your help.
Vito
Hi Brian,
Hi Brian,
Thank you Brian for your reply, I though it was the same issue but I am afraid it is not working in this case.
It still give me back Error: A valid mask is required for this field.
I converted it via hardwiring the code, therefore the issue is not with the data.
Hi Brian,
Hi Brian,
It was my masteke to post the incorrect code.
Here we are talking about just converting a field from character to date.
As datasets comes with a different formats I wanted the user to declare the date format and the formula do the rest.
I attach the correct code, that is not working.
Regards,
Vito
Thanks for your reply Brian,
Thanks for your reply Brian,
unfortunately that equation does not work for a Replace task as in this specific case.
I tried to use with an AppendTask and it works fine as far as the date is not 00/000/0000. It gives me an error when those type of records are parsed.
In my original question I was just wondering if there was a way to mimic the modify field function, is that possible?
Again many thanks for your help and support, very much appreciated.
Kind regards,
Vito
It is because you are missing
It is because you are missing a pair of quotes in the msgbox, that is why you are having a blank.