Change format of embedded data date | XM Community
Skip to main content

Hi

I need the help of the community :)

When we send a post-transaction survey, we bring to the embedded data a few dates data. 

For example here:

 

 

Is there any way I can do manipulation on these dates (in the survey flow or otherwise) to only show month, year, date without time etc?

If yes, where and now?

The usecase is that I need to calcualate things based on this - which I also need please an idea how - the number of days passed between X and Y, the days passed from survey completion to X or Y

Also, I want to manage a data set (imported data) of dates so I know which date was a working day, which was not including bank holidays etc.

 

Thanks a lot ! 

 

As usual asking also the experts :)

@TomG 

@vgayraud

@omkarkewat  

Since you need to both parse and do date arithmetic, I suggest you use the luxon javascript library. There is an example in this thread.


Thanks @TomG   You rock as always. I will dig into the solution. 

But in general what I understand is that I need an approach of a hidden question with JS that will do the math? 

Is there also approaches to such calculations when it comes to dashboards?

As some of my needs are for the survey itself and workflow triggering and some are for the dashboards analysis

 


Leave a Reply