# Converting selectedDate to YYYYMMDD-format

**URL:** <https://forum.kirupa.com/t/converting-selecteddate-to-yyyymmdd-format/75940>\
**Category:** flash\
**Created:** [January 13, 2005, 10:48am UTC](https://forum.kirupa.com/t/converting-selecteddate-to-yyyymmdd-format/75940 "2005-01-13T10:48:48Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![MrFlashALot](https://avatars.discourse-cdn.com/v4/letter/m/cdc98d/32.png) [@MrFlashALot](https://forum.kirupa.com/u/MrFlashALot)\
**Post date:** [January 13, 2005, 10:48am UTC](https://forum.kirupa.com/t/converting-selecteddate-to-yyyymmdd-format/75940/1 "2005-01-13T10:48:48Z")

</div>

Im trying to use the DateChooser. You can get the date by using “selectedDate”-function, but the format is so screwed up that I cant use it. Looks like this:

Wed Jan 12 00:00:00 GMT+0100 2005

Is there a quick way to turn this string into a string with “YYYYMMDD”-format (ie. “20050123”)?

Ive looked trough the help-files to see if the DateChooser-class has any quick-conversion functions, but I cant find any…
