The date/time functions allow you to get the date and time from the server where your PHP script runs. Tweet; Question Description. I often have to remind myself of how to convert a MySQL datetime to something a little more usable... a UNIX timestamp. Find the year in #datetime(2011, 12, 31, 9, 15, 36). I have a data set which has got commencement_dt as 23MAY2013:00:00:00 which is in DATETIME20. We can even calculate the year difference between two columns. weekofyear is an obsolete variant of week_of_year part. It accepts a DateTime object and a format string (representing a desired date/time format) as parameters, formats the object in the specified format and, returns the result. We have to deal with strtotime, formatting issues, lots of calculations, and more.. In this PHP tutorial, I will tell you how to get start date and end date from week number and year. You may need to modify this setting to get date and time in … Tip: Always add the