datetime to date only

  • 14 May 2018
  • 2 replies
  • 185 views

First, I'm a total newb so please be gentle with me!

 

I've searched for something like this and not really found anything.  The closest thing I've found is https://community.nintex.com/message/53437-date-field-formating-rules

 

I have a start time, an end time, and an all day event checkbox on my form.  If the all day event option is checked, I want the start time to be 12:00AM and the end time to be 11:59PM BUT I want those times hidden.  I can live with it if there's no way to hide the time portion and pre-load the times, but I need the time hidden.  Think about how outlook/exchange would handle this, if you want a reference.

 

If the all day is not selected then I want the times to show.

 

The underlying data is date and time in SharePoint.

 

I want to avoid JavaScript because I understand it can cause some challenges with mobile devices.  But if that's the only way, then I can live with that.

 

Oh!  and if that isn't way too much already, I need to validate that the end date/time is after the begin date/time

 

I think I can do the validation with rules, but as noted, I'm a newb, not even really crawling yet.  Can I do the datetime control format thing?

I feel like if I can get over this fundamental hump that I'll get the basics and can move forward.

Thanks in advance for any assistance.


2 replies

Userlevel 2
Badge +11

In Forms 2013 v2.11.2.2 on-prem it is possible to set "Date only" using an Expression.......

Jean-Pierre Huls

I thought so too, but I can't make it work. The checkbox Yes/No check box name is All_Day_Event and the JavaScript ID is AllDay. For the expression I've tried simply "All_Day_Event", "fn-Not(fn-IsNullOrEmpty(All_Day_Event))", and BUNCHES of other things that include creating a form variable and setting it to the yes/no value and then setting the expression to the variable. Nothing works.

Based on https://community.nintex.com/message/52301-how-to-customize-date-control-in-nintex-form, it suggests that the expression for 'Date only' of Date/Time control will be evaluated once at the time the form is loaded. If this is true, then it can't re-evaluate on a change event. Can it? Maybe there's a reload function?

This would have been CAKE in InfoPath, but here? Days of trial and failure. It simply can't be this damn difficult.

Reply