10 More Discussions You Might Find Interesting
1. Shell Programming and Scripting
Hello All,
I have a date in DD/MM/YYYY format. I am trying to convert this into unix timestamp. I have tried following:
date -d $mydate +%s
where mydate = 23/12/2016 00:00:00
I am getting following error:
date: extra operand `+%s'
Try `date --help' for more information.
... (1 Reply)
Discussion started by: angshuman
1 Replies
2. Shell Programming and Scripting
Hello,
I want to change the format of date value in variable.
e.g. cur_date = '2013/03/13 14:24:50' (yyyy/mm/dd hh24:mi:ss)
I want to change this to '13-MAR-2013 14:24:50
Following code coverts the current date to format I am looking for. But I do not know how this can be done for a date... (8 Replies)
Discussion started by: cartrider
8 Replies
3. UNIX for Dummies Questions & Answers
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)
Discussion started by: pchegoor
1 Replies
4. Shell Programming and Scripting
The 6th & 7th column of the text files represents date & time. I need this to be converted in julian format using command "date +%s -d <date>". I know the command, but dont know how to use it on the script
0 dbclstr-b IXT_Web Memphis_Prod_SQL_Full Memphis-Prod-SQL-Full-Application-Backup... (4 Replies)
Discussion started by: ajiwww
4 Replies
5. Shell Programming and Scripting
I've been using this thread:
https://www.unix.com/shell-programming-scripting/58675-change-date-dd-mmm-yyyy-mm-dd-yyyy.html
and
https://www.unix.com/shell-programming-scripting/14655-changing-yyyy-mm-dd-ddmmyy.html
and this code:
on this format:
05/16/2008 18:30:49 Installation 48985and I'm... (3 Replies)
Discussion started by: dba_frog
3 Replies
6. Shell Programming and Scripting
Hi All,
I have a string like below.
"Mar 31 2009" .
I want to convert this to unix time .
Also please let me know how to find the unix time for the above string minus one day. For Eg. if i have string "Mar 31 2009" i want to find the unix time stamp of "Mar 30 2009".
Thanks in advance,... (11 Replies)
Discussion started by: girish.raos
11 Replies
7. Shell Programming and Scripting
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)
Discussion started by: hazno
3 Replies
8. Shell Programming and Scripting
Dear Experts,
I need your help to convert a unix date and time format number in to readable format like dd/mm/yyyy .
I have a text file of more than 10,000 records and it is like
NAME DATE1 COUNTRY DATE2
ABD 1223580395699 USA 1223580395699... (3 Replies)
Discussion started by: shary
3 Replies
9. UNIX for Dummies Questions & Answers
Hi All,
Need your help in converting a date format in ksh.
I'm currently working on SUN os where my script is getting a date from a table.
The result returns to ksh in this format: 17-JUL-08
How do i convert this string to a date format like yyyymmdd?
I tried #!/bin/ksh
d="17-JUL-08"... (5 Replies)
Discussion started by: agathaeleanor
5 Replies
10. Shell Programming and Scripting
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)
Discussion started by: Bhups
2 Replies