cancel
Showing results for 
Search instead for 
Did you mean: 
Workflow Hero

Re: Validate Time portion of date/time control in a form

Jump to solution

I created my formula as:

dateDiffHours(new date(),RequestDate)

the when i previewed the form i got the error msg:

{The form is reporting the following errors:
NWF.RuntimeFunction.date.call is not a constructor}

and the calculated value didn't display any thing

any thing i missed here?

0 Kudos
Reply
Workflow Hero

Re: Validate Time portion of date/time control in a form

Jump to solution

the formula HAS TO look exactly like I posted it.

there has to be capital 'D' in "new Date" and there has to be a space between "Date" and braces "()"

0 Kudos
Reply
Workflow Hero

Re: Validate Time portion of date/time control in a form

Jump to solution

dateDiffHours(new Date (),RequestDate)

wooow, worked as a charm,

thank you so much, i was struggling everywhere to get it done

please let me know 2 things:

1- how to mark this as a solution

2- what is the "new Date" function? it was not listed any where, and where can i find a reference for these kind of functions?

once again many thanks 

Reply
Workflow Hero

Re: Validate Time portion of date/time control in a form

Jump to solution

next to each post header you should see green button 'Correct answer'. press it for the post you want mark as solution.

 

"new Date" creates javascript Date object. with no parameters supplied in parentheses with current date and time

Reply
Workflow Hero

Re: Validate Time portion of date/time control in a form

Jump to solution
equals(formatDate(StartDate,'hhtt'),'12AM')

How can I specify a time range? Say from 601PM - 859AM.

0 Kudos
Reply