Need To Convert Text To Date
There seem to be a lot of date formatting questions around here, but I've not seen quite what I'm needing to do.
I have a text field on a label in the format nnnnnn (221013 for example).This data is from a barcode that I'm scanning into a text prompt and truncating the data by removing characters either side of the part I want.
I need to convert this text into a date (ddMMyy) so I set up a second field that has Datasource type set to the Object value of the original field.
When I change the data type to date and the custom pattern ddMMyy, I was expecting to see my original text data show up as 221013, but now in date format rather than text. My plan is then to convert the date to 22 OCT 13 (I know how to do that part!)
Fail - the field just shows as <empty>
Any ideas as to what I'm doing wrong or maybe another way to do this?
Any help much appreciated!!
Cheers!
David
-
From the second text object, split up the data source into separate data sources each of which take in the full string as an input. You can the use truncations transforms to remove the bits of the input that you don't want for that particular part, and then either choose a "Date" type and choose the format of the date you want, or instead us a VB script to do the same thing.
0 -
Thanks, Ian - I'll try this out today.
0 -
OK, Ian, with your help and a little magical scripting from Michael Toupin in Tech Support,I'm in business!
Thanks so much :)
0
Bitte melden Sie sich an, um einen Kommentar zu hinterlassen.
Kommentare
3 Kommentare