LinuxQuestions.org
Did you know LQ has a Linux Hardware Compatibility List?
Go Back   LinuxQuestions.org > Forums > Non-*NIX Forums > Programming
User Name
Password
Programming This forum is for all programming questions.
The question does not have to be directly related to Linux and any language is fair game.

Notices



Reply
 
Search this Thread
Old 01-10-2005, 12:53 AM   #1
suchi_s
Member
 
Registered: May 2004
Posts: 133

Rep: Reputation: 15
convert date time format given in string


function in awk or shell script to convert the time in gmt or isd
 
Old 01-10-2005, 01:10 AM   #2
itsme86
Senior Member
 
Registered: Jan 2004
Location: Oregon, USA
Distribution: Slackware
Posts: 1,246

Rep: Reputation: 58
Convert the time from what format to what format?
 
Old 01-10-2005, 01:12 AM   #3
suchi_s
Member
 
Registered: May 2004
Posts: 133

Original Poster
Rep: Reputation: 15
date and time given in a string convert into the date time stamp since Epoch
 
Old 01-10-2005, 01:42 AM   #4
tutwabee
Member
 
Registered: Jan 2004
Location: California
Distribution: Ubuntu 10.04
Posts: 145

Rep: Reputation: 15
Or you could call the date command multiple times with different parameters to call for the time in gmt.
 
Old 01-10-2005, 02:01 AM   #5
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 360

Rep: Reputation: 41
like
Code:
date --date="Mon Jan 10 08:00:20 CET 2005" +"%s"
gives 1105340420
 
Old 01-10-2005, 05:03 AM   #6
suchi_s
Member
 
Registered: May 2004
Posts: 133

Original Poster
Rep: Reputation: 15
how to use mktime in awk
 
Old 01-10-2005, 05:06 AM   #7
rhoekstra
Member
 
Registered: Aug 2004
Location: The Netherlands
Distribution: RedHat 2, 3, 4, 5, Fedora, SuSE, Gentoo
Posts: 360

Rep: Reputation: 41
Don't know
 
  


Reply


Thread Tools Search this Thread
Search this Thread:

Advanced Search

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 Off
HTML code is Off


Similar Threads
Thread Thread Starter Forum Replies Last Post
c++ parse date string?? blizunt7 Programming 25 05-18-2006 04:12 PM
Start Date + Time Duration = End Date/Time calculator? ToBe Linux - General 3 09-26-2005 11:17 AM
Bug report: wrong date/time format in last visited wipe LQ Suggestions & Feedback 0 07-29-2004 07:21 AM
use vi to convert linux format to windows format intolinux Linux - Software 2 12-10-2003 11:20 PM
loading data from a flat file with a date and time having a different format spyghost Programming 2 11-02-2003 05:40 PM


All times are GMT -5. The time now is 10:55 AM.

Main Menu
Advertisement
My LQ
Write for LQ
LinuxQuestions.org is looking for people interested in writing Editorials, Articles, Reviews, and more. If you'd like to contribute content, let us know.
Main Menu
Syndicate
RSS1  Latest Threads
RSS1  LQ News
Twitter: @linuxquestions
identi.ca: @linuxquestions
Facebook: linuxquestions Google+: linuxquestions
Open Source Consulting | Domain Registration