hi,
for reading a cobol indexed file i need to convert "mmddyy" date format to "ccyyddd" format.
i checked the datecalc and other scripts but couldnt modify them to cater to my need:(...
The datecalc gives an output which i believe is the total days till that date, but i want to convert it... (2 Replies)
Hi
I have a sed command
sed -e "s/sub_date/=$(date +"%d/%m/%Y")/" sub_create_tmp
I want to substitute with the current date in dd/mm/yyyy format .
But the result is an error " cannot parse " .
Pls help .
sars (2 Replies)
I have a comma delimited log file which has the date as MM/DD/YY in the 2nd column, and HH:MM:SS in the 3rd column.
I need to change the date format to YYYY-MM-DD and merge it with the the time HH:MM:SS. How will I got about this?
Sample input
02/27/09,23:52:31
02/27/09,23:52:52... (3 Replies)
I have a list of dates in the following format: mm/dd/yyyy and want to change these to the MySQL standard format: yyyy-mm-dd.
The dates in the original file may or may not be zero padded, so April is sometimes "04" and other times simply "4".
This is what I use to change the format:
sed -i '' -e... (2 Replies)
I need to increment a date value through shell script.
Input value consist of start date and end date in DATE format of unix.
For eg.
I need increment a date value of 1/1/09 to 31/12/09 i.e for a whole yr.
The output must look like
1/1/09
2/2/09
.
.
.
31/1/09
.
.
1/2/09
.
28/2/09... (1 Reply)
I have tried various arguments to get the date display as "Mar 10".
I have tried
date +"%c" -------> Wed Mar 10 11:51:21 EST 2010
date +"%b%d%Y_%H%M%S" --------> Mar102010_115121
date +"%b%d" -------> Mar10
date +"%t%b%e" ... (3 Replies)
hi there
I have file names in different format as below
triss_20111117_fxcb.csv
triss_fxcb_20111117.csv
xpnl_hypo_reu_miplvdone_11172011.csv
xpnl_hypo_reu_miplvdone_11-17-2011.csv
xpnl_hypo_reu_miplvdone_20111117.csv
xpnl_hypo_reu_miplvdone_20111117xfb.csv... (10 Replies)
Hi All,
Following is my issue.
$MAIL_DOC = test.txt
test.txt contains the following text .
This process was executed in the %INSTANCE% instance on %RUNDATE%.
I am trying to execute the following script
var=`echo $ORACLE_SID | tr `
NOW=$(date +"%D")
sed -e... (3 Replies)
Hi Unix Gurus,
I would like to rename several files in a Unix Directory . The filenames can have more than 1 underscore ( _ ) and the last underscore is always followed by a date in the format mmddyyyy. The Extension of the files can be .txt or .pdf or .xls etc and is case insensitive ie... (1 Reply)
i try to set linux date & time in specific format but it keep giving me error
Example :
date "+%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
or
date +"%d-%m-%C%y %H:%M:%S" -d "19-01-2017 00:05:01"
keep giving me this error :
date: invalid date ‘19-01-2017 00:05:01'
Please use CODE tags... (7 Replies)
Discussion started by: umen
7 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)