Mathematica 9 is now available
Services & Resources / Wolfram Forums
-----
 /
MathGroup Archive
2007
*January
*February
*March
*April
*May
*June
*July
*August
*September
*October
*Archive Index
*Ask about this page
*Print this page
*Give us feedback
*Sign up for the Wolfram Insider

MathGroup Archive 2007

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

Search the Archive

Re: date format

  • To: mathgroup at smc.vnet.net
  • Subject: [mg75136] Re: date format
  • From: Szabolcs <szhorvat at gmail.com>
  • Date: Wed, 18 Apr 2007 05:02:23 -0400 (EDT)
  • References: <f015bp$9sk$1@smc.vnet.net>

On Apr 17, 2:45 am, Arkadiusz.Ma... at gmail.com wrote:
> Dear All,
>
> Form the following date format
>
> 04/Dec/2006:19:54:02
>
> could you please show me how to get the following representation {day,
> month, year, hour, minutes, seconds} - so exactly the same as for
> Date[]
>
> Thank you,
>
> Arek

Use ToExpression[StringSplit["04/Dec/2006:19:54:02",
Characters["/:"]]], then replace the month name by the number if you
need to, like this:

{4, Dec, 2006, 19, 54, 2} /. {Jan -> 1, Feb -> 2, ... }

Szabolcs





  • Prev by Date: Re: how make function of solution by NDSolve depending on parameter?
  • Next by Date: Re: open parenthesis and reduce an expression
  • Previous by thread: Re: date format
  • Next by thread: Re: date format