Convert Date, time and minute to "time"

2

I need to convert date, time and minute to that function time() , I tended something like time('$row[postdate] $row[posthora]') could not, is there any way to do this?

I do not have code to post, I just have to convert $row['postdate'] e $row['posthora']; // 09/03/2018 11:39 to time.

    
asked by anonymous 09.03.2018 / 15:40

1 answer

2

The time function does not receive parameters and indicates the number of seconds since the base date (1/1/1970) .

Maybe you're interested in DateTime . This function allows you to construct a date object. For example:

$umDiaQualquer = new DateTime('2018-03-09 11:39');
    
09.03.2018 / 15:55