Jun 16, 2006 #1 adaaje Technical User May 26, 2006 60 AU Hi guys, I would like to change the date format from : Fri Jun 16 18:14:32 2006 into : 20060616 I know to grab "2006" and '16', but what about to change Jun into 06, I'm sure you guys have quick idea to change this. Thanks in advance guys,
Hi guys, I would like to change the date format from : Fri Jun 16 18:14:32 2006 into : 20060616 I know to grab "2006" and '16', but what about to change Jun into 06, I'm sure you guys have quick idea to change this. Thanks in advance guys,
Jun 16, 2006 #2 PHV MIS Nov 8, 2002 53,708 FR You wanted this ? date '+%Y%m%d' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886 Upvote 0 Downvote
You wanted this ? date '+%Y%m%d' Hope This Helps, PH. Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
Jun 16, 2006 #3 mrn MIS Apr 27, 2001 3,993 GB man date usual options are %a locale's abbreviated weekday name (Sun..Sat) %A locale's full weekday name, variable length (Sunday..Saturday) %b locale's abbreviated month name (Jan..Dec) %B locale's full month name, variable length (January..December) %c locale's date and time (Sat Nov 04 12:02:33 EST 1989) %C century (year divided by 100 and truncated to an integer) [00-99] %d day of month (01..31) %D date (mm/dd/yy) %e day of month, blank padded ( 1..31) %F same as %Y-%m-%d %g the 2-digit year corresponding to the %V week number %G the 4-digit year corresponding to the %V week number %h same as %b %H hour (00..23) %I hour (01..12) %j day of year (001..366) %k hour ( 0..23) %l hour ( 1..12) %m month (01..12) %M minute (00..59) you may have more on your version of *nix Mike "A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant." http://www.airport-parking-site.co.uk/ Upvote 0 Downvote
man date usual options are %a locale's abbreviated weekday name (Sun..Sat) %A locale's full weekday name, variable length (Sunday..Saturday) %b locale's abbreviated month name (Jan..Dec) %B locale's full month name, variable length (January..December) %c locale's date and time (Sat Nov 04 12:02:33 EST 1989) %C century (year divided by 100 and truncated to an integer) [00-99] %d day of month (01..31) %D date (mm/dd/yy) %e day of month, blank padded ( 1..31) %F same as %Y-%m-%d %g the 2-digit year corresponding to the %V week number %G the 4-digit year corresponding to the %V week number %h same as %b %H hour (00..23) %I hour (01..12) %j day of year (001..366) %k hour ( 0..23) %l hour ( 1..12) %m month (01..12) %M minute (00..59) you may have more on your version of *nix Mike "A foolproof method for sculpting an elephant: first, get a huge block of marble, then you chip away everything that doesn't look like an elephant." http://www.airport-parking-site.co.uk/