Php date related question!

hai folks,

$userdt="4/20/2011"; (notice the date is in American format)
$dt=strtotime($userdt);

is above code is perfect? or i better split the values and use mktime()?

As per PHP’s date formats the American format is one of the accepted formats and since it can’t be confused with any format (since it uses slashes instead of dashes) I’d say you’re fine :slight_smile:

Thanks a lOt scallio for the note…