01-17-2019 08:29 PM - edited 03-14-2019 06:44 PM
Hello Folks , I'm triyin to construct a new date to use it later for an if, the set today = new Date or set today = D[now] works fine,but the set new date ( today .getDate () + ( mills_in_a_day ) shows the epoch time january 1 1970. Is there sometinh missing?
UCCX Version 10.5 Premium
Thanks a lot
Solved! Go to Solution.
01-17-2019 09:59 PM
getDate() returns the day of the month. E.g., today would be 17
new Date(long) instantiates a new Date object using long's value as the number of millis since 1/1/1970 00:00:00.000.
E.g.,
new Date(17) = 1/1/1970 00:00:00.017
I think you want getTime(), which returns the number of millis since epoch for the current datetime.
01-17-2019 09:59 PM
getDate() returns the day of the month. E.g., today would be 17
new Date(long) instantiates a new Date object using long's value as the number of millis since 1/1/1970 00:00:00.000.
E.g.,
new Date(17) = 1/1/1970 00:00:00.017
I think you want getTime(), which returns the number of millis since epoch for the current datetime.
01-18-2019 08:22 AM
Hello Anthony , thanks for your response, you are the man!.
I change the set as you posted and works perfect, by the way, why the getTime resolve the date? I'm a little confused, I used the solution on a previous post that use detonate:
https://community.cisco.com/t5/contact-center/how-to-get-tomorrows-date-in-uccx-script/td-p/1752963
Thanks for your help
01-18-2019 10:52 AM
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide