date


  • (JS) Validate date in format YYYY-MM-DD

    A simple JS function to validate that a date string in the format YYYY-MM-DD is a valid date. Will validate that the day is correct for the given month, including leap years

  • Convert MySQL timestamp to PHP date

    If you save your date in the format of timestamp in your MySQL database, and want to output it like this: [php] $result = mysql_query("SELECT * FROM articles"); $row = mysql_fetch_array($result); $date = $row[‘timestamp’]; echo $date; [/php] Your date come out looking something like this: 2011-01-30 20:54:12 So it’s formated like YYYY-MM-DD HH:MM:SS But what…