Mathematica 9 is now available
Services & Resources / Wolfram Forums / MathGroup Archive
-----

MathGroup Archive 2010

[Date Index] [Thread Index] [Author Index]

Search the Archive

Re: data in absolutetime

  • To: mathgroup at smc.vnet.net
  • Subject: [mg109909] Re: data in absolutetime
  • From: "Hans Michel" <hmichel at cox.net>
  • Date: Sat, 22 May 2010 00:42:17 -0400 (EDT)
  • References: <op.vc0m79s4422244@toshiba> <ht5o84$14f$1@smc.vnet.net>

Beata:

You are correct that
AbsoluteTime["20100520"]
 Works
In[1]:= AbsoluteTime["20100520"]
Out[1]= 3483302400

Your list c is a list of numbers. When you try the single value, you enclose 
it in quotes.
Here are 2 list one is a list of strings d, c is your version.

d={"20100520","20100519","20100512","20100516","20100430","200100425","20100411","20100407"};
c={20100520,20100519,20100512,20100516,20100430,200100425,20100411,20100407};

In[3]:= Map[AbsoluteTime,d, 1]
Out[3]= 
{3483302400,3483216000,3482611200,3482956800,3481574400,6314499548755200,3479932800,3479587200}

In[4]:= Map[AbsoluteTime,c, 1]
Out[4]= 
{1.3359792985435000*10^9,1.3359792985435000*10^9,1.3359792985435000*10^9,1.3359792985435000*10^9,1.3359792985435000*10^9,1.3359792985435000*10^9,1.3359792985435000*10^9,1.3359792985435000*10^9}

In[5]:= Map[AbsoluteTime, Map[ToString,c,1],1]
Out[5]= 
{3483302400,3483216000,3482611200,3482956800,3481574400,6314499548755200,3479932800,3479587200}

If you wish to leave your list as a list of integers the see above.

Hans

So you need to
"Beata Warchol" <beatawarchol at gmail.com> wrote in message 
news:ht5o84$14f$1 at smc.vnet.net...
> Dear MathGroup,
>
> I have list of date
> for example:
> c={20100520,20100519,20100512,20100516,20100430,200100425,20100411,20100407}
> in this format.
> I need get from this list a new list with the same date but in 
> absolutetime
> When I use AbsoluteTime["20100520"], I get this, but I don't know how  can 
> I
> use it for whole list c
>
> Please for help
> Beata
>
> 



  • Prev by Date: Re: combining ArrayPlot with ListLinePlot
  • Next by Date: Re: enter specific symbols for ListPlot usage
  • Previous by thread: Re: data in absolutetime
  • Next by thread: Re: data in absolutetime