Multiple Nominal to Date conversions
Hello,
I'm currently working in a file that will need multiple 'Nominal to Date' operators for multiple columns. Is there an operator that I would be able use to do all of the conversions or would I need to use an opeartor per column(field)?
TIA
Answers
-
@mtran how are you loading the data? If you're doing it via a flat file like CSV or XLS, you can set the attribute column as a date-time format on load. If not, you could try a 'Guess Types' operator but I'm not sure if that will work.
1 -
@Thomas_Ott Thanks for the quick reply. I noticed I was able to set the data types to 'Date' when using flat files but one of the guys on my team is pulling data in from SQL server.
1 -
You can use the Loop Attributes operator to loop through each date field and use nominal-to-date in one hit.
(Remember to check reuse results) - if using Macros for the attributes then this process can be really easily reused.
I'm sure I recall seeing @awchisholm using a bit of Groovy script for this type of conversion before as well.
3