<div dir="ltr"><div class="gmail_default" style="font-family:georgia,serif;font-size:small">Hi All,</div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small">I'm trying out the date time conversions in Haskell.</div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small">How do I convert a keyboard input (IO String) to UTCTime?</div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small">This is how I'm doing (probably there's a better way), </div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"> convDay x = read (x ++ " 00:00:00") :: UTCTime</div><div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"></div></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small"><br></div><div class="gmail_default" style="font-family:georgia,serif;font-size:small">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?</div><div><br></div>-- <br><div class="gmail_signature"><div dir="ltr"><div><div><div><font face="georgia,serif">Regards, <br>Dananji Liyanage</font></div></div></div></div></div>
</div>