Change Date Format? - Change Date Format Country
Original Post by Christian A. (Imported from Ardevia Forum)
Anyone know how to change date format Country?.
For example in Mexico we would have to have the date 09.04.2015 the day is 4 ( Friday) , the month is 9 ( September) and the Year 2015
Thank you
-
Original Post by Andrii Katsiubka (Imported from Ardevia Forum)
Anyone know how to change date format Country?.
Hi,
Please specify more detailed you problem? You want to change date format on some action, expression or something else.0 -
Original Post by Christian A. (Imported from Ardevia Forum)
I'm Sorry Andrii
In a calculated field I want the start date is higher than TODAY.
So when I make the calculation of [StartDate] > [Today] and I get the error that the date does not exist, because in Mexico the month is the second position not the first position of a date.For example
México = day.month.year
Start Date = 02.19.2016Thanks
0 -
Original Post by Pascal van Alphen (Imported from Ardevia Forum)
Hi Ardevia,
Any reply to this issue? I have a customer who is evaluating Ardevia forms and this is a potential showstopper. We need to be able to do date calculations with dates that are in d-m-jjjj format. At the moment it seems that date calculations only work for m-d-jjjj dates.
Thanks,
Pascal0 -
Original Post by Remco (Imported from Ardevia Forum)
Originally Posted by: Pascal van Alphen
Hi Ardevia,
Any reply to this issue? I have a customer who is evaluating Ardevia forms and this is a potential showstopper. We need to be able to do date calculations with dates that are in d-m-jjjj format. At the moment it seems that date calculations only work for m-d-jjjj dates.
Thanks,
PascalIn addition to Pascals question, I have found that the formatting of the datatime field can be done by adding
Code:
[[Datefield]]= newDate().format("d-m-yyyy")but calculations based on that field
Code:
[[Datefield]].addDays(2)
are showing an eval error:
Quote:
Failed eval expression: Error occured on evaluating expression "=[[Datefield]].addDays(2)"arguments[0].addDays is not a function
Whereas the evaluation of [[Datefield]] results in
Quote:
Evaluation succeeded!Value: "5-7-2016"
When i remove the formatting tag from the initial [[Datefield]] value the calculated field works as well. Is there any workaround for this?
0 -
Original Post by Oleg (Imported from Ardevia Forum)
Hi Pascal and Remco,
In order to change dateformat and to do some calculation with dates, you can put the following lines of [i]Function code[/i] expression into a 'Expression Builder - Calculated Value' popup
var localeFormat = "d.M.yyyy H:mm"; var date = Date.parseLocale([[DateField]], localeFormat); // creates a date object date = date.addDays(2); // then you can do some calculations with the date object //afterwards you can work with any other date format var yourFormat = 'dd-MM-yyyy'; var newDate = Date.parseLocale(date.format(yourFormat), yourFormat); newDate = newDate.addDays(2) return newDate;
You can't write like this:Quote:
[[Datefield]].addDays(2)
because [[Datefield]] here is a string value, not a date objectBest Regards,
Oleg Kachmar
Software Engineer0 -
Original Post by Pascal van Alphen (Imported from Ardevia Forum)
Thanks Oleg, that helps!
0
Please sign in to leave a comment.
Comments
6 comments