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

Format of Date field in transform map

Alon Grod
Tera Expert

Hi,

 

In my xlsx file the Date filed is written: 04-AUG-2022

Is there any way to change the date format in the transform map so it will know how to get this format from the xlsx file?

 

Screen Shot 2023-01-30 at 12.01.09.png

1 ACCEPTED SOLUTION

Hi @Alon Grod ,

No we don't have that  date format in ServiceNow. ServiceNow date fields will not take if you pass 04-AUG-2022 like this.

If it helps please click Accept as Solution/hit the Thumb Icon.
ServiceNow Community MVP 2024.
Thanks,
Pavankumar

View solution in original post

18 REPLIES 18

Im not getting the date field.

Screen Shot 2023-01-30 at 12.43.07.png

xlsx file:

Screen Shot 2023-01-30 at 12.43.29.png

Have you tried like below-

var sd = new GlideDate();
sd.setValue( source.<date_attribute>)
var formatedDate=sd.getByFormat('D-M-yyyy');
return formatedDate

Kevin Paul
Mega Guru

Hi,

This is out of topic! I tried to post a question in the developer forum, but it is still waiting for some approval. How can I get it approved? and post the question?