I want to get the minimum date from the date column of a multidimensional array, but only from rows with keycode of 0001. How would I achieve that? Expected result: 2015-08-01 Answer I would first extract all of the values that have a keycode of 0001 and create a new array of just those dates. Then use the php min()
Tag: date-comparison
Get most recent date from an array of dates in “Y-m-d H:i:s” format
I have the array of dates in Y-m-d H:i:s format like: I would like to know the most recent date. In other words, today is June 13th 2012, which datetime is closest to today’s date? From my sample array, I am expecting 2012-06-11 08:30:49. How can I do that? Answer Do a loop, convert the values to date, and store