Convert date format to yyyy-mm-dd from a string
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 02:04 AM
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 02:33 AM - edited 06-26-2023 02:33 AM
Hi @SNow35
Please share the sample date you are importing.
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 02:39 AM
I believe the above solution works when the import set field is also date type, but our field is string.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
06-26-2023 02:37 AM
The Sample date format is MM/DD/YYYY