LISTSERV mailing list manager LISTSERV 16.0

Help for LINUX-L Archives


LINUX-L Archives

LINUX-L Archives


LINUX-L@LISTS.UFL.EDU


View:

Message:

[

First

|

Previous

|

Next

|

Last

]

By Topic:

[

First

|

Previous

|

Next

|

Last

]

By Author:

[

First

|

Previous

|

Next

|

Last

]

Font:

Monospaced Font

LISTSERV Archives

LISTSERV Archives

LINUX-L Home

LINUX-L Home

LINUX-L  2007

LINUX-L 2007

Subject:

Re: converting time format in awk

From:

James Oulman <[log in to unmask]>

Reply-To:

Platform Independent Linux List! <[log in to unmask]>

Date:

Wed, 24 Oct 2007 11:58:25 -0400

Content-Type:

text/plain

Parts/Attachments:

Parts/Attachments

text/plain (21 lines)

Mauricio Tavares wrote:
> I am doign some stuff using awk to a file and need to convert some
> time stamps in 12h format to 24h format. Can I do that or need to throw
> in some perl-foo?
>

You can probably use strftime() but I believe it expects the input
format as seconds-since-epoch, so you would need to convert the input
date first.

Have you tried using GNU date to do the conversion. Depending on your
timestamps, and what you expect as output, it may just do the right
thing. Eg.

$ date -d 'Wed Oct 23 05:53:36PM EDT 2007'
Tue Oct 23 17:53:36 EDT 2007

--
James Oulman <[log in to unmask]>
CNS/Open Systems Group
352-392-2061 x204

Top of Message | Previous Page | Permalink

Advanced Options


Options

Log In

Log In

Get Password

Get Password


Search Archives

Search Archives


Subscribe or Unsubscribe

Subscribe or Unsubscribe


Archives

2020
2019
2018
2017
2016
2015
2014
2013
2012
2011
2010
2009
2008
2007
2006
2005
2004
2003
2002
2001
2000
1999
1998
1997

ATOM RSS1 RSS2



LISTS.UFL.EDU

CataList Email List Search Powered by the LISTSERV Email List Manager