# Insert the date into MySQL

**URL:** <https://community.ofelia.com/t/insert-the-date-into-mysql/6349>\
**Category:** Q&A\
**Created:** [20 August 2015 15:19 UTC](https://community.ofelia.com/t/insert-the-date-into-mysql/6349 "2015-08-20T15:19:21Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![ghada45](https://avatars.discourse-cdn.com/v4/letter/g/a4c791/32.png) [@ghada45](https://community.ofelia.com/u/ghada45)\
**Post date:** [20 August 2015 15:19 UTC](https://community.ofelia.com/t/insert-the-date-into-mysql/6349/1 "2015-08-20T15:19:21Z")

</div>

Hi,  
I’m using BOS 6.5.1 and MySQL and they don’t have the same format of date,  
so my problem is, how can i get the date from the widget and save it on the Data Base??  
PS: i’m newbie , so please describe your solution with details.

Thank you very much for your time and your attention.

---

<div class="post-metadata">

**Author:** ![Sean\_McP](https://dub1.discourse-cdn.com/flex013/user_avatar/community.ofelia.com/sean_mcp/32/932_2.png) [@Sean\_McP](https://community.ofelia.com/u/Sean_McP)\
**Post date:** [21 August 2015 09:02 UTC](https://community.ofelia.com/t/insert-the-date-into-mysql/6349/2 "2015-08-21T09:02:36Z")

</div>

You get the date from the screen and then do a piece of java code in the output operation and then send it to the DB.

Your form has a datepicker.

in your process you set the output operation (click on the pencil to edit the script), use this to transform the datepicker date to mysql date as a new variable (java/groovy code).

then use this variable in your SQL statement

regards
