MathGroup Archive 2010

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

Search the Archive

Re: data in absolutetime

  • To: mathgroup at
  • Subject: [mg109920] [mg109920] Re: data in absolutetime
  • From: Bill Rowe <readnews at>
  • Date: Sat, 22 May 2010 23:33:37 -0400 (EDT)

On 5/21/10 at 6:44 AM, beatawarchol at (Beata ) wrote:

>I have list of date for example:
>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

The way to achieve this is to use Map. That is:

In[2]:= AbsoluteTime[ToString@#] & /@ c

Out[2]= {3483302400,3483216000,3482611200,3482956800,3481574400,6314499548755200,3479932800,3479587200}

Here, I've used the shorthand way of expressing Map. This could
have been done as

Map[AbsoluteTime[ToString@#]&, c]

or it could be done without using explicit pure functions (the
AbsoluteTime[ToString@#]& part) as


And to verify the result is what it should be:

In[3]:= DateString /@ %

Out[3]= {Thu 20 May 2010 00:00:00,Wed 19 May 2010 00:00:00,Wed
12 May 2010 00:00:00,Sun 16 May 2010 00:00:00,Fri 30 Apr 2010
00:00:00,Wed 1 Jan 200100425 00:00:00,Sun 11 Apr 2010
00:00:00,Wed 7 Apr 2010 00:00:00}

  • Prev by Date: Re: How to Enable Automatic Recalculation
  • Next by Date: Re: Intersection of sublists on date and making a 2D list from a 3D
  • Previous by thread: Re: data in absolutetime
  • Next by thread: V. 6.0: PNG export problems