update date/time field with today

  • 1
  • Problem
  • Updated 2 years ago
  • Solved
  • (Edited)
When I use "Today" to update a date/time field


 I get the following error



If I put a specific date in it works. But not using "Today', Yesterday", or "Tomorrow" 
Photo of Bill Fox

Bill Fox

  • 7,934 Points 5k badge 2x thumb

Posted 2 years ago

  • 1
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
Strange. A Date/Time field shouldn't be updated with these options since these only provide the date and no time.

The options should be only a specific date/time, NOW, and maybe X Days with time selection.
Photo of Bill Fox

Bill Fox

  • 7,934 Points 5k badge 2x thumb
Thanks Pat.

Here are my options on a date//time field.  It used to post the date and time.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
As I was saying, those values shouldn't be available for a date/time field. ie. Yesterday, Today, Tomorrow, Last Week, etc. All aren't applicable to be used in setting a date/time field.
Photo of Bill Fox

Bill Fox

  • 7,934 Points 5k badge 2x thumb
But they are and they used to work.  Skuid, any input?
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
I'm not sure how. All of them except for "Specific Date" are for SOSL & SOQL Date Literal comparisons. I think this is a bug.

Look at the drop down list of available choices. ie. "Next n Quarters". What would date/time value be for this?
Photo of Amy Dewaal

Amy Dewaal, Official Rep

  • 8,200 Points 5k badge 2x thumb
Hi Bill,

What version of Skuid are you running? Does updating to the newest version fix your problem? I'm having trouble recreating this problem so could you recreate the problem on a page using standard Salesforce objects and paste the XML? 

Thanks!
Amy 
Photo of Dave

Dave

  • 5,538 Points 5k badge 2x thumb
Bill & Pat  i'm currently using that scenario u described in many places and have no issue at all using today in "update field on row" for date/time fields.

Running version 8.13
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
Ok. You're right that some of these do work. Strangely I couldn't find any documentation that would suggest Today, Yesterday and Tomorrow would work. Thinking Skuid auto calculates this at runtime.

The other options certainly don't work. Tested this to make sure. So the options made available should be reduced to just the top 4.

So, Bill, I have no idea what's going on here. Suspect there's something else going on.
Photo of Andrew N

Andrew N

  • 1,178 Points 1k badge 2x thumb
Did we ever figure out what was causing this behavior? I seem to be running into the exact same scenario - I select "Today" for a date/time field and I get the following error. However, if I use a specific date it works fine.



I am running Skuid version 8.11.

Any guidance?

Thanks,
Andrew
Photo of Bill Fox

Bill Fox

  • 7,934 Points 5k badge 2x thumb
It was fixed when I upgraded to the newest version.
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,220 Points 5k badge 2x thumb
Bill~

There were changes made to this in Rockaway Point Release - Iteration 10 per this item in the release notes: [SKUID-2387] - "TODAY" resolves to midnight instead of Current Time.

Thanks!
Karen
Photo of Allison

Allison

  • 360 Points 250 badge 2x thumb

Karen,


We were previously using the Today function to the current time, which is now all set to 12:00.  How do we set the condition back to the actual time?

Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,220 Points 5k badge 2x thumb
Allison~

If you upgrade to Iteration 10 or later, Today will return the current time again. 

Thanks!
Karen
Photo of Allison

Allison

  • 360 Points 250 badge 2x thumb
We actually just updated to 11 (version 8.15.9) and started experiencing this issue.  I update the code to Now() instead of Today() but heads up that I think it's still an issue with 11.
Photo of mB Pat Vachon

mB Pat Vachon, Champion

  • 42,704 Points 20k badge 2x thumb
Can the NOW function be added to the drop list of options.

Photo of Chandra V

Chandra V, Champion

  • 6,966 Points 5k badge 2x thumb
I just tried this again: Rockaway version 8.15.9 - still getting an error.  I tried hacking in the NOW but couldn't get it to work (list index out of bounds error.)

Tried in Brooklyn and it worked, but got 12/13/2016 12:00 AM as my value when the action was set to TODAY.  I think this thread indicated that the expected behavior of TODAY on a date/time field was to replicate NOW, and actually use the current time.  I didn't see that happening in Brooklyn, and it was a complete fail in Rockaway (which is our production environment :/   )
Photo of Karen Waldschmitt

Karen Waldschmitt, Official Rep

  • 8,220 Points 5k badge 2x thumb
Hi~

Sorry for the confusion. Yes, the NOW vs. TODAY issue has been fixed in Brooklyn and is different from Rockaway. In Brooklyn, NOW is a timestamp of the current time and TODAY is midnight on the current day. 

Thanks!
Karen