[Haskell-beginners] Date Time in Haskell

Dananji Liyanage dan9131 at gmail.com
Thu May 14 07:20:13 UTC 2015


Hi All,

I'm trying out the date time conversions in Haskell.

How do I convert a keyboard input (IO String) to UTCTime?

This is how I'm doing (probably there's a better way),
              convDay x = read (x ++ " 00:00:00") :: UTCTime
​​

Another thing, how do I convert getCurrentTime (IO UTCTime) to UTCTime in
order to get the time difference between the keyboard input date and today?

-- 
Regards,
Dananji Liyanage
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://mail.haskell.org/pipermail/beginners/attachments/20150514/a7ae7af5/attachment.html>


More information about the Beginners mailing list