Page 1 of 1

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

Posted: Mon Aug 29, 2016 10:42 pm
by neuronhighway9522

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


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

Posted: Thu Sep 01, 2016 5:34 am
by Serhii Kulibaba

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...


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

Posted: Thu Sep 01, 2016 10:03 pm
by neuronhighway9522

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!