php - using strtotime with datetimepicker and adding 1 day -
I am saving my database in this format in column 'time' (user input using the Datatmapiker):
example: 07-31-2014 03 : 37 am
I also have a column named 'column' if 'time' (the time saved in the column) + 24 hours is more than current time () then 'position' = = time limit Finish 'Below is my attempt, take Qin I think strtotime is not interpreting my timestamp because all this has ended ... Example: 08-19-2014 02:05 am Expired
If ((strtotime ($ line ['time']. "+1 days")) & lt; time ()) {$ row ['status'] = 'expired'; Suppose you are getting the date from the database like this format "07/31 -"
You need to convert it and it must be formatted as a stratome readable below.
list ($ month , "$ Line ['time']); $ line ['time'] = $ year." - "$ line ['time'] = $ year." - $ line [$ time, $ min, $ year, $ hour, $ min] = preg_split ("/ [- \ s:] + /" ". $ Month." - ". $ Day." ". $ Hour.": ". $ Min" ": 00";
Try it out.
Comments
Post a Comment