neuronhighway9522
Posts: 0
Joined: Sun Oct 19, 2014 2:42 am

Simple code to get CreatedAt column to read mm/dd/yyyy when mapped to a label.

Im mapping from the created At column
I just need it to be in the mm/dd/yyyy format

I tried this :
var a = moment(value, "yyyy-mm-dd HH:mm:ss.SSS");
var b = a.format("mm-dd-yyyy");
return b;

and placing this code on the label when mapping it from the rest service ..it gives an invalid date.

Im sorta desperate here since i asked PRIORITY support a week ago for an answer and of course "this is outside the scope of their service" and asked to buy more service packs. (so not going to happen now) I tried to find an answer from the old answers on the forum and so far none of them have worked.
Can anyone help me out? So glad Im paying for priority support SMH

Serhii Kulibaba
Posts: 150
Joined: Tue Aug 27, 2013 1:47 pm

Simple code to get CreatedAt column to read mm/dd/yyyy when mapped to a label.

Hello,

Please use a code below: prea.format("MM-DD-YYYY"); /pre

instead of: prevar b = a.format("mm-dd-yyyy"); /pre because:
mm - minutes
dd - short form of the day of week

more information about the format you can find here: http://momentjs.com/docs/#/displaying...

neuronhighway9522
Posts: 0
Joined: Sun Oct 19, 2014 2:42 am

Simple code to get CreatedAt column to read mm/dd/yyyy when mapped to a label.

ok well I tried the other way first with caps as I should have and it was coming back with an invalid date .. hence my post ... but heres after four days and several emails the first solution...

Yurii Orishchuk Sunday at 21:59
Hello,

Thank you for your update.

Unfortunately this is something outside the scope of standard Appery.io platform support. You may consider purchasing Advisory Pack to get more in-depth help on this question. Here is more information about Advisory Pack.

Regards,

Yurii Orishchuk | The Appery.io Team (aka the man who always is soooo helpful)

so.... I modified two different users answers and this is the code that works perfectly

var a = moment(value);
var b = a.format("MM-DD-YYYY");
return b;

Thank you Sergiy you are the bomb!

Return to “Issues”