# Date formatting and solution model

**URL:** <https://forum.servoy.com/t/date-formatting-and-solution-model/11374>\
**Category:** Classic Servoy\
**Created:** [November 6, 2009, 2:58pm UTC](https://forum.servoy.com/t/date-formatting-and-solution-model/11374 "2009-11-06T14:58:44Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![motorup](https://avatars.discourse-cdn.com/v4/letter/m/278dde/32.png) [@motorup](https://forum.servoy.com/u/motorup)\
**Post date:** [November 6, 2009, 2:58pm UTC](https://forum.servoy.com/t/date-formatting-and-solution-model/11374/1 "2009-11-06T14:58:44Z")

</div>

Hi all, anyone tried to format a date using solution model?

Here is what I do:

```auto
var form = solutionModel.newForm('lst_equipment_detail',controller.getServerName(),"equipments",null,true,1,1);
var field = form.newCalendar(data_provider_name, x, y, w, h);
field.format = "dd-MM-yyyy";
field.formIndex = 3;

```

When I view the resulting form, I can click on the calendar icon, it shows the correct formatting,  
but when I choose a date it is displayed following my formatting but rather like this: Thu Nov 19 00:00:00 EST 2009.

Anyone has an idea?

Thanks

Philippe

---

<div class="post-metadata">

**Author:** ![jcompagner](https://yyz2.discourse-cdn.com/flex010/user_avatar/forum.servoy.com/jcompagner/32/4889_2.png) [@jcompagner](https://forum.servoy.com/u/jcompagner)\
**Post date:** [December 7, 2009, 1:41pm UTC](https://forum.servoy.com/t/date-formatting-and-solution-model/11374/2 "2009-12-07T13:41:07Z")

</div>

i can’t reproduce this.  
Please make a case with a sample solution
