Your achievements

Level 1

0% to

Level 2

Tip /
Sign in

Sign in to Community

to gain points, level up, and earn exciting badges like the new
Bedrock Mission!

Learn more

View all

Sign in to view all badges

shri91127
shri91127
Offline

Badges

Badges
2

Accepted Solutions

Accepted Solutions
0

Likes Received

Likes Received
0

Posts

Posts
2

Discussions

Discussions
0

Questions

Questions
2

Ideas

Ideas
0

Blog Posts

Blog Posts
0
Top badges earned by shri91127
Customize the badges you want to showcase on your profile
Re: How to change date format for an instance variable holding date info? - Adobe Campaign 19-01-2022
Hi @Krishnanunni ,Thanks for your response. I tried the below per your solution, I'm still getting the same error.var NovDate = new Date();NovDate = formatDate(NovDate, "%4Y%2M%2D%2H%2M%2S");Is this how you meant earlier? I'm not sure if this is the appropriate syntax:formatDate(NovDate, "%4Y%2M%2D%2H%2M%2S")This works with formatDate(new Date(), "%4Y%2M%2D%2H%2M%2S"); Thanks!

Views

133

Likes

0

Replies

1
How to change date format for an instance variable holding date info? - Adobe Campaign 19-01-2022
I have created a variable,var NovDate = new Date(); This date is in MON DD YYYY Format. I want to convert this to YYYMMDD format. If I write the function : var NovDate = formatDate(NovDate, "%4Y%2M%2D%2H%2M%2S"); , I'm getting an error as below: JST-310000 Error while compiling script 'WKF5041/start' line 6: NovDate.getDate is not a function. Please assist.

Views

141

Likes

0

Replies

3