The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > UNIX for Advanced & Expert Users
.
google unix.com



UNIX for Advanced & Expert Users Expert-to-Expert. Learn advanced UNIX, UNIX commands, Linux, Operating Systems, System Administration, Programming, Shell, Shell Scripts, Solaris, Linux, HP-UX, AIX, OS X, BSD.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
help with date command netrom Shell Programming and Scripting 9 08-06-2008 02:37 AM
Help with a Date Command !!! kumarsaravana_s UNIX for Dummies Questions & Answers 1 05-28-2007 04:33 PM
Date Command -1 greengrass UNIX for Dummies Questions & Answers 4 01-24-2007 06:18 PM
date command vshyam4949 UNIX for Dummies Questions & Answers 2 01-30-2006 11:40 AM
Date Command saldana UNIX for Dummies Questions & Answers 2 02-05-2004 11:50 AM

Closed Thread
English Japanese Spanish French German Portuguese Italian Dutch Swedish Russian Norwegian Hungarian Hebrew Danish Bulgarian Greek Powered by Powered by Google
 
LinkBack Thread Tools Search this Thread Rate Thread Display Modes
  #1 (permalink)  
Old 04-30-2008
bsandeep_80 bsandeep_80 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 122
date command help

Hi,

I have the following date command for getting the below result:

`date '+%m%d%y'`

Result:

043008

Can someone help me make change in command so that i have the result as

04302008

Sorry that its a very easy for experts here , but i am a newbie. Please help

Thanks,
Sandeep
  #2 (permalink)  
Old 04-30-2008
redhead's Avatar
redhead redhead is offline
Registered User
  
 

Join Date: Feb 2002
Location: Denmark
Posts: 68
`date '+%m%d%Y'`
  #3 (permalink)  
Old 04-30-2008
bsandeep_80 bsandeep_80 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 122
Thats the same command that i have pasted.

Thanks,
Sandeep
  #4 (permalink)  
Old 04-30-2008
jim mcnamara jim mcnamara is offline Forum Staff  
...@...
  
 

Join Date: Feb 2004
Location: NM
Posts: 5,807
No, it is not.

%Y = four digit year
%y = two digit year

Sit down, open the man page for date. Scroll down until you hit the format section.
There you will find how to change date output. This page is also important because other functions in languages like perl and C use the same format control.
  #5 (permalink)  
Old 04-30-2008
bsandeep_80 bsandeep_80 is offline
Registered User
  
 

Join Date: Jul 2007
Posts: 122
yes i see that. Thanks so so much for the explanation. this works..i appreciate it

thanks,
sandeep
Closed Thread

Bookmarks

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes Rate This Thread
Rate This Thread:

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On




All times are GMT -4. The time now is 12:11 AM.


Powered by: vBulletin, Copyright ©2000 - 2006, Jelsoft Enterprises Limited. Language Translations Powered by .
vBCredits v1.4 Copyright ©2007 - 2008, PixelFX Studios
The UNIX and Linux Forums Content Copyright ©1993-2009. All Rights Reserved.Ad Management by RedTyger

Content Relevant URLs by vBSEO 3.2.0