The UNIX and Linux Forums  

Go Back   The UNIX and Linux Forums > Top Forums > Shell Programming and Scripting
.
google unix.com



Shell Programming and Scripting Post questions about KSH, CSH, SH, BASH, PERL, PHP, SED, AWK and OTHER shell scripts and shell scripting languages here.

More UNIX and Linux Forum Topics You Might Find Helpful
Thread Thread Starter Forum Replies Last Post
convert date format YYYYMMDD to MM/DD/YYYY nasirgondal Shell Programming and Scripting 8 04-08-2009 11:56 AM
Change Date from dd-mmm-yyyy to mm/dd/yyyy stringzz Shell Programming and Scripting 9 09-15-2008 11:09 AM
how to convert the string YYYYMMDD into YYYY.MM.DD spatra UNIX for Dummies Questions & Answers 1 07-23-2008 08:18 AM
Convert filenames with DDMMYYYY to YYYYMMDD cbo0485 Shell Programming and Scripting 10 04-24-2008 01:48 PM
To convert the numeric month into alphabetic rooh UNIX for Dummies Questions & Answers 2 08-20-2001 04:20 PM

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 08-07-2008
rspk_praveen rspk_praveen is offline
Registered User
  
 

Join Date: Aug 2008
Posts: 5
How to convert DDMMYYYY to DD MONTH YYYY in Unix

Hi
I am having date as a string in DDMMYYYY format(07082008) in a variable say cdate. I want to Convert it into DD Month YYYY format(7 August 2008). Could someone help. Thanks in Advance.
  #2 (permalink)  
Old 08-07-2008
zaxxon's Avatar
zaxxon zaxxon is offline Forum Staff  
Moderator
  
 

Join Date: Sep 2007
Location: Germany
Posts: 2,313
Check some threads below in here:
convert date format YYYYMMDD to MM/DD/YYYY

There are some ideas in there. Maybe you just add something like to convert the month's number, when separated by awk/substr, with the 3 characters you need.
  #3 (permalink)  
Old 08-07-2008
fpmurphy's Avatar
fpmurphy fpmurphy is online now Forum Staff  
Moderator
  
 

Join Date: Dec 2003
Location: Florida
Posts: 1,943
If you are using ksh93

Code:
$ cdate="07082008"
$ printf "%(%d %B %Y)T\n" $cdate
08 July 2008
$

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 11:33 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