Hi, David.
I use PDOExtended class and write php webservice from it.
I have some problem with date format.
if the code like this in example.
And return array as json.And "datein" is datetime field as Y-m-d and time format.
I want to change format to d/m/Y and time.
And show data "datein" in report control.
How can I change datetime format?
which sql query do I need to coding?
thanks. (I spend 1 days but cannot fix it)
Hello tin,
Please, update your App Builder copy. The new sample "Report16" shown how we can use the AngularJS "date" filter inside a Report in order to achieve what you wanted: take certain date formated in some way (timestamp or a format like your own one) and convert it into another date format string.
Thanks,David.You choose to change in client side not the server side.
But it same result as I expect. :)
oh. I test it.It cannot change format.
because my output from database is "2016-12-30 00:00:00"
It have time in data,then this format code not work.
or I doing something wrong?
Hello tin,
Are you sure there is not a typo on "dateget"? If not, note that we can format a date value from certain format to another: not all possible date formats are supported. Have you the possibility to change the date field with a "timestamp" value? I think this can be the best option, between other things, because we can format a "timestamp" value to other formats, then may this can solve the problem.
Or maybe you can perform (this can be also a good solution) the date forma transformation on the server side, and provide the application with the correct date format values...
Hello tin,
I modify a bit the "Report16" sample to include "hour" information in the date fields, and, apparently they works well. Please, take a look at the attached file and tell me what do you think about tin.
(Modified) Report16.zip
Everybody can read the DecSoft support forum for learning purposes, however only DecSoft customers can post new threads. Purchase one or more licenses of some DecSoft products in order to give this and other benefits.