
14 Jun
2011
14 Jun
'11
5:05 p.m.
On Tue, 14 Jun 2011 22:33:56 +0200, Dmitri O.Kondratiev
I am trying to convert data string to time:
import Data.Time import Data.Time.Format import Locale
ds = "10/11/2009 7:04:28 PM" t = parseTime defaultTimeLocale "%D %H:%M:%S %p" ds :: Maybe UTCTime
and get "Nothing". What is wrong?
According to the documentation[0], %D expects a two digit year. Regards, Henk-Jan van Tuyl [0] http://hackage.haskell.org/packages/archive/time/latest/doc/html/Data-Time-F... -- http://Van.Tuyl.eu/ http://members.chello.nl/hjgtuyl/tourdemonad.html --