DateTime Format Issue

Stimulsoft Reports.JS discussion
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: DateTime Format Issue

Post by BCS »

Has there been an update to the latest issue, there has been 3 minor releases but they have no list of changes accompanying them.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: DateTime Format Issue

Post by HighAley »

Hello.

Finally, we have found the cause of the issue.
It was browser specific. The fix will be available in our next build on Friday.

Thank you.
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: DateTime Format Issue

Post by BCS »

Will this fix be available today? It seem to only occur in Chrome for date and/or time
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: DateTime Format Issue

Post by HighAley »

Hello.

Yes, please, check the latest build and let us know about result.

Thank you,
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: DateTime Format Issue

Post by BCS »

Seems to have fixed the DateTime issue, but if I have a field I just want to display the time as without a date its ignoring ToString("hh:mm tt"). Shows correct in IE and Safari but not Chrome, assuming its another browser specific issue.

For instance:

If I want to display 11:00 AM, its displaying 11:00:00, I've tried Text Format as Time, Date, Custom, various combinations of that with ToString and nothing works.

I can probably get around this for now but curious if my findings are correct or if I'm doing it wrong.
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: DateTime Format Issue

Post by HighAley »

Hello.

Sorry, we can't reproduce the issue.
time.png
time.png (3.88 KiB) Viewed 3566 times
Please, check the attached report.
Report (35).mrt
(1.26 KiB) Downloaded 164 times
Thank you.
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: DateTime Format Issue

Post by BCS »

The difference in yours vs mine (possibly, not sure what else you tested) is that yours is calling a system variable (Time), mine starts with a JSON datasource var which will be

{
...
"DateTime" : "2017-01-23 13:30:00"
...
}

Your method works in all browsers BUT Chrome, it also works in the Designer, I'm just saying it doesn't work in Chrome and I don't think I have the means to workaround that or fix.

Text Format is set to General, Type in the DataSource Dictionary is set to DateTime, Text Expression is {.....ToString("hh:mm tt")}

Chrome Version 55.0.2883.95 (64-bit)
Screenshot at Jan 23 12-16-52.png
Screenshot at Jan 23 12-16-52.png (6.42 KiB) Viewed 3565 times
Screenshot at Jan 23 12-27-07.png
Screenshot at Jan 23 12-27-07.png (9.94 KiB) Viewed 3565 times
HighAley
Posts: 8431
Joined: Wed Jun 08, 2011 7:40 am
Location: Stimulsoft Office

Re: DateTime Format Issue

Post by HighAley »

Hello.

The Column type should be set to the DateTime.
Please, check the attached report.

Thank you.
Attachments
data.json
(114 Bytes) Downloaded 171 times
Report36.mrt
(2.88 KiB) Downloaded 158 times
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: DateTime Format Issue

Post by BCS »

This is your report and dataset when run thru the browser Chrome:
chrome.png
chrome.png (15.71 KiB) Viewed 3560 times
This is the view inside the Designer:
Screenshot at Jan 25 09-42-57.png
Screenshot at Jan 25 09-42-57.png (7.81 KiB) Viewed 3560 times
BCS
Posts: 83
Joined: Thu Nov 17, 2016 5:47 am

Re: DateTime Format Issue

Post by BCS »

Update: Not sure if it was loaded initially on cache but now my report I was reporting about seems to be now applying the custom format. I will monitor it and let you know if it returns.

For the record, setting the data field type to datetime and using a custom text format of "hh:mm tt" seems to work.
Post Reply