MathGroup Archive 2008

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

Search the Archive

Re: list of dates

  • To: mathgroup at smc.vnet.net
  • Subject: [mg88392] Re: [mg88334] list of dates
  • From: Bob Hanlon <hanlonr at cox.net>
  • Date: Sat, 3 May 2008 06:20:17 -0400 (EDT)
  • Reply-to: hanlonr at cox.net

myDate[x_String] :=
  DateDifference["1900-01-01", x, "Year"][[1]];

myDate /@ {"1963-01-01", "1985-07-01"}

{63,85.4959}


Bob Hanlon

---- Roger Nye <roger.nye at actuary.ch> wrote: 
> Hi,
> I have a list of dates in the format YYYY-MM-DD and I want to convert them 
> to a decimal value, so 1963-01-01 goes to 63.0 and 1985-07-01 goes roughly 
> to 85.5.
> 
> Any suggestions on the best way to do this?
> 
> Many thanks
> Roger 
> 
> 



  • Prev by Date: Re: list of dates
  • Next by Date: Re: Wolfram Workbench user experiences
  • Previous by thread: Re: list of dates
  • Next by thread: Re: list of dates