Using rbv_api.selectQuery() to get Date/Time fields now returns them in this format:
Thu May 03 08:34:35 CDT 2012
They used to be returned in this format:
2012-03-29 14:10:25.0
Now, all of our triggers/formulas that parse a Date/Time value obtained from SQL API are no longer working.
Can this be changed back?
Thanks,
Mike
Query API returns instances of JavaScript Date class, you don't need to parse them.
Using rbv_api.selectQuery(), Date fields are returned in this format:
2012-01-05 00:00:00.0
Using rbv_api.selectQuery(), Date/Time fields are returned in this format:
Thu Jan 05 10:15:49 CST 2012
Previously, both Date AND Date/Time fields were returned in this format:
2012-01-05 00:00:00.0
This is the way we set up all of our code. We expect a date field and date/time field to be returned in the same format that it has always been returned.
2012-01-05 00:00:00.0
Why does Rollbase change the format of data that is returned? Each time a change like this happens, there are tons of formulas/triggers/javascript on pages/etc. that need to be changed on our end. Rollbase updates should be backwards-compatible.
A similar thing happened a few months ago with rbf_selectQuery. It used to return dates in this format:
2012-01-05 00:00:00.0
Then, Rollbase changed it to return dates as a Javascript date object. At t
2012-01-05 is raw SQL format. Instead now query API returns JavaScript Date instance (with correct time zone) which can be used directly without any parsing.
Hmm.. It appears that dates are once again returned in raw SQL format?
var date = rbv_api.selectQuery("SELECT date_issued FROM permit1 WHERE id ="+ permId,1);
rbv_api.println("Date: " + date[0][0]);
Output: Date: 2012-06-11 00:00:00.0
Are they going to stay like this or are you going to change it to "Thu Jan 05 10:15:49 CST 2012" format again?
Thank you
There was no change but possible a bug: I'm investigating.
Hello,
We have also seen a change of date format of fields returned from selectQuery between Rollbase version 2.0.0.3 and Rollbase 2.1.0.0. Is this something we can configure, or is there a format we can rely on staying the same going forward?
Thank you