Multiple Nominal to Date conversions

mtran
mtran New Altair Community Member
edited November 2024 in Community Q&A

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

  • Thomas_Ott
    Thomas_Ott New Altair Community Member

    @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. 

  • mtran
    mtran New Altair Community Member

    @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.  

  • JEdward
    JEdward New Altair Community Member

    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.