in reply to convert user-entered date to compare with mtime

And, though this may already be obvious to you, you'll have to make sure the date entered by the user is in some recognizable format...
yyyy-mm-dd, mm/dd/yy, dd/mm/yy and so on are just a few of the variants which are widely used.
So... you need to constrain the user's input. Guessing (perhaps utterly wrongly, but the principal applies generally) that the user entered date may be coming from a form on the web, make sure your form requires a format which one of the suggestions above can recognize.
  • Comment on Re: convert user-entered date to compare with mtime