FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.



Jun 26, 2013, 9:56 AM
67 Posts
topic has been resolvedResolved

DateTime Calculation in SSJS

  • Category: Other
  • Platform: All
  • Release: 8.5.3
  • Role: Developer
  • Tags: DateTime
  • Replies: 2

 

@Text(@Round(((@Date(2013,7,1,0,0,0)- @Now)/86400000))) + " Days"

 

The result is:  15887 Days (when calculated on 26. June 2013)

I think it schould be 4 Days.

 

Does anybody know the reason ?

Thanks, Uwe

Jun 26, 2013, 10:50 AM
54 Posts
@Now

@Now is a function.

So you need to write

@Text(@Round(((@Date(2013,7,1,0,0,0)- @Now())/86400000))) + " Days"

Jun 26, 2013, 2:22 PM
67 Posts
Little detail .....

but it works ... Thank you


FORUM PLAN UPDATE
Date revision: This forum will remain open to new posts and responses until December 1, 2018. (After that date, you will still be able to view and search the forum.) Also, we're taking a second look at the best place to host future conversation. For now, keep using this forum, and stay tuned for more news.