# Date Function

**URL:** <https://community.unix.com/t/date-function/191331>\
**Category:** Shell Programming and Scripting\
**Created:** [April 2, 2008, 7:36am UTC](https://community.unix.com/t/date-function/191331 "2008-04-02T07:36:36Z")\
**Posts on this page:** 2\
**Page:** 1

<div class="post-metadata">

**Author:** ![charandevu](https://community.unix.com/letter_avatar/charandevu/32/6_449c533f586939b6e5f246632a46421f.png) [@charandevu](https://community.unix.com/u/charandevu)\
**Post date:** [April 2, 2008, 7:36am UTC](https://community.unix.com/t/date-function/191331/1 "2008-04-02T07:36:36Z")

</div>

Hi,

My file format is:

E102,0,21-04-2007,0,2/25/1994,E003,A,125400,10450,60.2884620  
E103,0,21/04/2007,0,2/2/1996,E003,A,125400,10450,60.2884620  
E104,0,04/21/2007,0,2/2/1996,E003,A,125400,10450,60.2884620  
E105,0,21-APR-2007,0,2/2/1996,E003,A,125400,10450,60.2884620  
E106,0,21-APR-07,0,2/2/1996,E003,A,125400,10450,60.2884620  
E107,0,21-04-07,0,2/25/1994,E003,A,125400,10450,60.2884620  
E108,0,21/04/07,0,2/2/1996,E003,A,125400,10450,60.2884620  
E109,0,04/21/07,0,2/2/1996,E003,A,125400,10450,60.2884620

I want to convert any type of date format into 'YYYYMMDD' in Unix.

If anyone knows the coding pls help me in this.

Quick response would be helpful.

Thanks,  
Charan

---

<div class="post-metadata">

**Author:** ![Franklin52](https://community.unix.com/user_avatar/community.unix.com/franklin52/32/500_2.png) [@Franklin52](https://community.unix.com/u/Franklin52)\
**Post date:** [April 2, 2008, 7:44am UTC](https://community.unix.com/t/date-function/191331/2 "2008-04-02T07:44:46Z")

</div>

[charandevu,](http://www.unix.com/members/302039539.html)

Double posting questions is against the:

[Simple rules of the UNIX.COM forums:](http://www.unix.com/unix-dummies-questions-answers/2971-simple-rules-unix-com-forums.html)

Please don't start new threads for a similar question or you'll be banned!

Thread closed.
