Re: Date and timestamp conversion

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



Am Mittwoch, den 19.04.2006, 13:03 +0100 schrieb Dan Track:
> On 4/19/06, Paul Howarth <paul@xxxxxxxxxxxx> wrote:
> > Dan Track wrote:
> > > Hi
> > >
> > > Does anyone know how to convert between the `date -s` output to
> > > timestamp and vice versa. Also does anyone know how to get the
> > > timestamp for a date period in the past or future?
> >
> > I don't really understand the question.
> >
> > Please give an example of the two formats you want to convert between.
> >
> > Paul.
> >
> Hi Paul
> I'd like to convert
> Wed Apr 19 13:02:16 BST 2006 --> timestamp
> or
> timestamp --> Wed Apr 19 13:02:16 BST 2006
> 
> How would I do the above?
> 
> Is there a simple script for this?
Did you mean an POSIX date ?

Is this what you want ?:

R 2.2.1>date()
[1] "Wed Apr 19 14:33:32 2006"
R 2.2.1>as.integer(ISOdate(2006,4,19,14,33,32))
[1] 1145457212
R 2.2.1>

(I am using R for this (see www.r-project.org)
Reinhard

> 
> thanks
> Dan
> 


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux