Skip to main content

We have a ui-only Formula(Text) field that’s used as a grouping on a chart. The formula is written as follows:

MONTH_NAME_SHORT({{CompletedDate__c}})+" “+DAY({{CompletedDate__c}})+”, "+YEAR({{CompletedDate__c}})


For some reason it seems to be evaluated for CompletedDate__c minus one day. For example, if CompletedDate__c = “2015-03-01”, then the formula evaluates to Feb 28, 2015.

Do you know why that might be the case?

Thanks,
Kartik Sethuraman


Hello Kartik -

I can’t say for certain but the issue you are seeing might be similar or the same as https://community.skuid.com/t/datetime-field-not-converting-correctly-based-on-user-timez….

In short, a “Date” field does have a time, it’s just always 00:00:00.  Depending on your timezone setting, you would see 3/1/15 become 2/28/15.

Skuid Team - Could this be the same as the issue I mentioned in the other post?


Hey Barry,

It does seem to be the same/similar issue- when I update the user’s time zone to a GMT +X timezone, the dates are displaying correctly. The strange part to me though is that there’s any time zone conversion happening at all for a date field. Especially since Skuid stores the date values as “2015-03-01” in the underlying model without any 0s for the time portion.

Thanks for the additional information! Hopefully the fix that’s on its way for the issue you reported will resolve this one as well.

Thanks,
Kartik



Hey Kartik -

I updated my post with a link back to this post just to help ensure all scenarios are covered (date & datetime fields).

It’s been a while since I dug in to the way skuid processes merge fields, etc. but I think the reason you are seeing this behavior even with date fields is that skuid converts the field value to its “data type” (in this case JS date object) via it’s APIs in the skuid.time object, then formats it when outputting merge syntax, field renders, etc.  Since the javascript date object includes a time, it falls prey to the timezone issue. 


Ahh that would make sense- thanks for the help!


Kartik~

I have been able to reproduce the error you described and have notified our developers of this bug. Thanks for reporting this to us!

Thanks!
Karen


Barry,

Yes, this is the same issue that you have previously brought up. 

Thanks!
Karen


Good deal, thanks for confirming Karen!


Reply