The CreatorCon Call for Content is officially open! Get started here.

Convert date format to yyyy-mm-dd from a string

SNow35
Giga Guru

Hi All,

 

We have a csv file from where we are loading the data, here from csv we are getting the data to import set which is a string and my target field is a date type field. I am trying to change the format using getFormat method which doesnot work as it is a string.

 

Please let me know if anyone has achieved it.

 

Thanks in advance.

3 REPLIES 3

Voona Rohila
Mega Patron
Mega Patron

Hi @SNow35 

Please share the sample date you are importing.

Import a Date Field 

https://support.servicenow.com/kb?id=kb_article_view&sysparm_article=KB0622865

 


Mark it helpful if this helps you to understand. Accept solution if this give you the answer you're looking for
Kind Regards,
Rohila V
2022-25 ServiceNow Community MVP

I believe the above solution works when the import set field is also date type, but our field is string.

SNow35
Giga Guru

The Sample date format is MM/DD/YYYY