07-07-2006
date formatting
Date format MM/DD/YYYY
required is YYYYMMDD, I tried using sed but could not get it any help please.
10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
i need date in the following format December 14, 2005.
With date +"%b %d, %Y" command i am getting the following output :- Dec 14, 2005.
can anyone pls tell me how to get the full month name (2 Replies)
Discussion started by: radhika03
2 Replies
2. UNIX for Dummies Questions & Answers
Running bash how do I input the date in the command line like 3/20/90 and get an output formmated like March, 20 1990. (8 Replies)
Discussion started by: knc9233
8 Replies
3. Shell Programming and Scripting
hi all,
in ksh, how do i format date so it includes hour and minute ?? i am trying the following command :
date +%Om/%Od/%Oy%OH:%M
but it displays the hour and minute concatenated with the day/month/year e.g 12/10/0814:08
when i want the output to be
12/10/08 14:08
i tried... (4 Replies)
Discussion started by: cesarNZ
4 Replies
4. Shell Programming and Scripting
Hi
i need to have the date in the format like dd-mon-yyyy
my script goes like this
#!/usr/bin/bash
for f in /space/can /home/lbs/current/externalcdrbackup/L_CDR_Configuration/1/200903122* ; do
awk '{sum++;}END{for(i in sum) {print d,h,m,i, sum}}' "d=$(date +'%m-%d-%Y')" "h=$(date +'%H')"... (8 Replies)
Discussion started by: aemunathan
8 Replies
5. OS X (Apple)
Hi -
I'm using GeekTool to customize my desktop in OS X 10.5.8
I'm a complete novice as far as UNIX commands, just know enough to be dangerous.
I have a command entered as a Shell to display my events from iCal:
This makes my events show something like this:
While this is... (1 Reply)
Discussion started by: patricksprague
1 Replies
6. Shell Programming and Scripting
Hi,
the date value retrieved by a parameter from the table is of the format dd/mm/yyyy. please let me know how to convert this to YYYYMMDD using sed
thanks (4 Replies)
Discussion started by: swasid
4 Replies
7. Shell Programming and Scripting
Hi all
Y=`date +'%Y'`
M=`date +'%m'`
D=`date +'%d'`
if && ;then
yesterday=$Y$M`expr $D + 30`
echo $yesterday
else
if && ; then
yesterday=$Y$M`expr $D + 29`
echo $yesterday
else
if ; then
yesterday=$Y$M`expr $D + 27`
echo $yesterday
else
yesterday=$Y$M`expr $D - 1`
echo... (8 Replies)
Discussion started by: ultimatix
8 Replies
8. Emergency UNIX and Linux Support
can anyone one help me....to make date and time format...to following format for my file
Code:
DATE TIME DD- MON- YEAR 24 Hours I have a need of format like this
12-Jan-2012 in one column, then time in 24 Hours in another column....please help...me...
... (7 Replies)
Discussion started by: nex_asp
7 Replies
9. UNIX for Dummies Questions & Answers
Hi,
How can i store the date + time from the output of the ls command in loop in a variable date1?
-rw-rw---- 1 user1 admin 500002 Jan 2 21:24 P002607.cssI then want to convert Jan 2 21:24 to this date format 2014-01-02 21:24:00 and save it in date2 variable.
Then i would like to add... (1 Reply)
Discussion started by: mohtashims
1 Replies
10. Shell Programming and Scripting
Hi,
I am having the below data in input file. The file contains multiple such lines.
The file is comma delimited.
AAA,M,CCCCCC,EE,DD,FF,GG,1187.00000,01-MAY-05
BBB,M,CCCCCC,EE,DD,FF,GG,87.00000,10-MAY-05
I need to create below output file out of it-
<tag1>AAA</tag1>... (3 Replies)
Discussion started by: Arjun_CV
3 Replies
LEARN ABOUT DEBIAN
convert::nls_date_format
Convert::NLS_DATE_FORMAT(3pm) User Contributed Perl Documentation Convert::NLS_DATE_FORMAT(3pm)
NAME
Convert::NLS_DATE_FORMAT - Convert Oracle NLS_DATE_FORMAT <-> strftime Format Strings
SYNOPSIS
use Convert::NLS_DATE_FORMAT qw(oracle2posix posix2oracle);
my $strptime = oracle2posix($NLS_DATE_FORMAT);
$NLS_DATE_FORMAT = posix2oracle($strftime);
DESCRIPTION
Convert Oracle's NLS_DATE_FORMAT string into a strptime format string, or the reverse.
Functions
oracle2posix
Takes an Oracle NLS_DATE_FORMAT string and converts it into formatting string compatible with "strftime" or "strptime".
my $format = oracle2posix('YYYY-MM-DD HH24:MI:SS'); # '%Y-%m-%d %H:%M:%S'
Character sequences that should not be translated may be enclosed within double quotes, as specified in the Oracle documentation.
my $format = oracle2posix('YYYY-MM-DD"T"HH24:MI:SS'); # '%Y-%m-%dT%H:%M:%S'
posix2oracle
Takes a "strftime" or "strptime" formatting string and converts it into an Oracle NLS_DATE_FORMAT string. It is possible to create
strings which Oracle will not accept as valid NLS_DATE_FORMAT strings.
my $format = posix2oracle('%Y-%m-%d %H:%M:%S'); # 'YYYY-MM-DD HH24:MI:SS'
EXPORT
None by default. "oracle2posix" and "posix2oracle" when asked.
SEE ALSO
DateTime::Format::Oracle.
AUTHOR
Nathan Gray, <kolibrie@cpan.org>
COPYRIGHT AND LICENSE
Copyright (C) 2005, 2006, 2011, 2012 Nathan Gray
This library is free software; you can redistribute it and/or modify it under the same terms as Perl itself, either Perl version 5.8.4 or,
at your option, any later version of Perl 5 you may have available.
perl v5.14.2 2012-01-18 Convert::NLS_DATE_FORMAT(3pm)