# Date Reformat

**URL:** <https://forum.cloverdx.com/t/date-reformat/1304>\
**Category:** CloverDX Platform\
**Created:** [November 17, 2013, 12:00am UTC](https://forum.cloverdx.com/t/date-reformat/1304 "2013-11-17T00:00:00Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![desflaherty](https://avatars.discourse-cdn.com/v4/letter/d/b38774/32.png) [@desflaherty](https://forum.cloverdx.com/u/desflaherty)\
**Post date:** [November 17, 2013, 12:00am UTC](https://forum.cloverdx.com/t/date-reformat/1304/1 "2013-11-17T00:00:00Z")

</div>

Hi

I was wondering if it was possible for you to tell me how to implement JAVA code or other method to convert dates in Clover ETL.  
They are currently stored as string data type.

Example:

I want to convert to format 06-Jul-37.

Dates are currently in format:

12/07/1939  
1938 January 26  
February 9 1998

Also missing whole date where I want to set to NULLS

26-Jul  
6 1982

Thanks,

---

<div class="post-metadata">

**Author:** ![imriskal](https://avatars.discourse-cdn.com/v4/letter/i/b38774/32.png) [@imriskal](https://forum.cloverdx.com/u/imriskal)\
**Post date:** [November 20, 2013, 3:15pm UTC](https://forum.cloverdx.com/t/date-reformat/1304/2 "2013-11-20T15:15:55Z")

</div>

Hello,

You can convert your strings to date and then back to string in another format. Something like:

```auto
$out.0.my_date = date2str(str2date("01/01/1970", "dd/MM/yyyy"), "dd-MMM-yy");

```

And what exactly do you mean by the second question? Would you like to replace any incomplete date with NULL value? If so, I recommend parsing the string and testing whether it contains everything necessary (using common if conditions).

Kind regards,
