Page 1 of 1

Change date format to yyyymmdd (no slashes)

Posted: Mon Feb 25, 2013 11:48 pm
by Don

Change date format to yyyymmdd (no slashes).
Best I can do it set to yy/mm/dd - which results in yyyy/mm/dd output.
It will not let me set the format to exclude the slashes.

I tried with JS, but can not seem get it to work.

Can anyone share how to do the JS for this?


Change date format to yyyymmdd (no slashes)

Posted: Tue Feb 26, 2013 12:53 am
by maxkatz

You can parse the string to remove the slashes.


Change date format to yyyymmdd (no slashes)

Posted: Tue Feb 26, 2013 2:44 am
by Don

Hi Max,

Thanks... I have been trying to do that.
I am sure my issue is that I do not know how to get the app value into the Javascript and then back into the app.

The variable name is settings_date

I tried:

settings_date.replace(/\//g,"");

but that did not work.


Change date format to yyyymmdd (no slashes)

Posted: Tue Feb 26, 2013 4:43 am
by maxkatz

Let me know if this helps: http://stackoverflow.com/questions/23...


Change date format to yyyymmdd (no slashes)

Posted: Fri Jul 18, 2014 3:04 pm
by EJLD

Hi Everyone,
hv similar matter.
I want to display in a label the _createdAt which I get from the appery DB.
how/where shall I insert my code to have a simpler format like "yy/mmm/dd hr:min" i/o the all including seconds and millisec. ?
thk you very much in advance,
Eric


Change date format to yyyymmdd (no slashes)

Posted: Fri Jul 18, 2014 4:39 pm
by Kateryna Grynko

Hi Eric,

You can add your code to service response mapping as follows:
http://devcenter.appery.io/documentat...


Change date format to yyyymmdd (no slashes)

Posted: Sat Jul 19, 2014 7:00 am
by EJLD

Thks for your prompt fdbk. I'll check this out.