On Tue, 14 Jun 2011 22:33:56 +0200, Dmitri O.Kondratiev
<[email protected]> wrote:
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-Format.html#v:formatTime
--
http://Van.Tuyl.eu/
http://members.chello.nl/hjgtuyl/tourdemonad.html
--
_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe