cancel
Showing results for 
Search instead for 
Did you mean: 
Nates_Mom
Nintex Newbie

Validate Time portion of date/time control in a form

Jump to solution

Hi All, 

Can someone advise how to set validation on the time portion of the date and time in Nintex Forms?

I have a Date/Time field that I was to require people to change form the Default 12AM.

Thanks!

Reply
14 Replies
Nates_Mom
Nintex Newbie

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

Jump to solution

Can anyone advise?

0 Kudos
Reply
Automation Master
Automation Master

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

Jump to solution

rule with formula like this should work

equals(formatDate(StartDate,'hhtt'),'12AM')

note it will only validate when date portion is filled as well.

0 Kudos
Reply
Automation Master
Automation Master

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

Jump to solution

‌ - did this work out for you?

‌ -- in your formula, I'm guessing that '12AM' is whatever time you need that default to be ... but what would be input to 'hhtt'?  

0 Kudos
Reply
Automation Master
Automation Master

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

Jump to solution

Sure you can check for any hour you want.

But I do not get what you mean 'input to hhtt'

It's a format string that directs formatDate() function to return hour and AM/PM flag out of supplied date, so ithas always to be there in that form.

Reply
madkour
Nintex Newbie

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

Jump to solution

this worked for me, but i have another question related to time portion only

how to validate "Meeting Requested Time" to be >= 5 hours from the current time, which is the form submission time?

the "Meeting Requested Time" is a named control for Date/time field

0 Kudos
Reply
madkour
Nintex Newbie

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

Jump to solution

this worked for me, but i have another question related to time portion only

how to validate "Meeting Requested Time" to be >= 5 hours from the current time, which is the form submission time?

the "Meeting Requested Time" is a named control for Date/time field

0 Kudos
Reply
Automation Master
Automation Master

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

Jump to solution
0 Kudos
Reply
Highlighted
madkour
Nintex Newbie

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

Jump to solution

thank you for your reply, i tried the DateFiffHours, it didnt calculate the correctly coz it consider the CurrentDate time as 12:00AM all the time

it didnt consider the real current time

0 Kudos
Reply
Automation Master
Automation Master

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

Jump to solution

that's not a problem of DateDiffHours() function.

it's problem of CurrentDate reference which is always created with 12:00AM.

to compare with exact current date and time use following formula

dateDiffHours(new Date (),DateCtrl)
0 Kudos
Reply