Showing posts with label Date commands. Show all posts
Showing posts with label Date commands. Show all posts

19 Sept 2012

Different date formats in Unix


Date Format: 

1 > $a=`date '+%d%m%y_%H%M%S'`
$echo $a
130812_195306

2 >$a=`date '+%d%m%Y_%H%M%S'`
$echo $a
13082012_195409

3 >$a `date '+%d-%m-%Y %H:%M:%S'`
$echo $a
13-08-2012 19:57:13
-->