Hi,
I want to know how to change this string to date format
20061102122042 to 02-11-2006 12:20:42
or 02-Nov-2006 12:20:42
Please let me know at the earliest.Thanks in advance.
Regards,
Preetham R. (3 Replies)
I know the command date +"%Y%m%d" can change today's date to digit format as below .
$date +"%Y%m%d"
20071217
it works fine .
now I want to do it back . If I have a file like below, (in the file , there are three lines, and each line have ; sign , after the ; sign is the date ) , I... (4 Replies)
Hi All,
this is my second post, last post reply was very helpful.
I have a data that has date in DD/MM/YYYY (07/11/2008) format i want to replace the backslash by a dot(.) so that my awk script can read it inside the C shell script that i have written.
i want to change 07/11/2008 to... (3 Replies)
dear members,
ls -l
drwxr-xr-x 40 root sys 1024 Jul 11 22:19 usr
drwxr-xr-x 43 root sys 1024 Feb 1 2009 var
i am using solaris 10
is that possibe to do
drwxr-xr-x 40 root sys 1024 25-08-2009 22:19 usr
drwxr-xr-x 43 root sys ... (4 Replies)
Hi guys,
I have a text file with lots of lines like this:
MCOGT23R27815 27/07/07 27/05/09
SO733AM0235 30/11/07 30/11/10
NL123403N 04/03/08 04/03/11
0747AM7474 04/04/08 04/04/11
I want to change each line so the date format looks like this:
MCOGT23R27815 07/07/27 09/05/27 ... (7 Replies)
Dear Friends,
Need your help once again,
I have a variable ( e.g. ${i}) whoch has date in MM/DD/YYYY (E.g. 12/31/2011) format.
I want to change it to DD/MM/YYYY (e.g. 31/12/2011) format.
Request you to guide me as we are unable to do the same.
Thanks in advance
Anu. (1 Reply)
Hi,
I have the variable "$date_update" in that form:
2011-12-31T13:00:09Z and I would like to change it to
31/12/2011 13:00:09 (Date and Time separated by a blank).
Does anyone has a simple solution for that? (using Korn Shell)
Cheers
Jurgen (4 Replies)
Hi all,
I have a file that every line starts with the date and time. The format is like YYYYMMDDHHMM and I woulk like to change it to MM/DD/YY<space>HH:MM.
I tried to figure out a way to do it with sed, but I don't know how I could reorganize the digits of the first format. Does anyone have any... (1 Reply)
Hi,
I was looking for a script to change the date from one format to other. A search in the forum gave me the below script as a result.
#! /bin/ksh
format=YYYYMMDD
YEAR=${format%????}
DAY=${format#??????}
MON=${format#$YEAR}
MON=${MON%$DAY}
echo $MON/$DAY/$YEAR
I got it... (2 Replies)
Discussion started by: prithvirao17
2 Replies
LEARN ABOUT CENTOS
dm_date
DM_DATE(1) User Contributed Perl Documentation DM_DATE(1)NAME
dm_date - print out the system date and time
SYNOPSIS
This performs the same operation as the unix 'date' command, but using the Date::Manip module.
dm_date [OPTION]... [+FORMAT]
DESCRIPTION
This displays information about the current system time, or some other time. Options are:
-h, --help
Print online help.
-d STRING, --date=STRING
Display time described by STRING. STRING can be any string which can be parsed by Date::Manip. Please refer to the Date::Manip::Date
documentation for details.
-f DATEFILE, --file=DATEFILE
This reads each line in DATEFILE, and extracts a date from it and prints out the information.
Blank lines and lines starting with a pound (#) are ignored. Lines not containing a valid date are also ignored.
-r FILE, --reference=FILE
Displays the last modification time of FILE.
-R, --rfc-2822
Displayc the date and time in RFC 2822 format.
Example: Mon, 07 Aug 2006 12:34:56 -0600
-u, --utc, --universal
Converts the date to UT (GMT) and prints out the information.
Only one of -d, -f, or -r should be included. If more than one is included, the first one from the list (-d, -f, -r) is used and any other
is ignored.
The format string starts with a plus (+) and contains any of the format directives described in Date::Manip::Date.
KNOWN BUGS
None known.
BUGS AND QUESTIONS
Please refer to the Date::Manip::Problems documentation for information on submitting bug reports or questions to the author.
SEE ALSO
Date::Manip::Date
LICENSE
This script is free software; you can redistribute it and/or modify it under the same terms as Perl itself.
AUTHOR
Sullivan Beck (sbeck@cpan.org)
perl v5.16.3 2014-06-09 DM_DATE(1)