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