Given a DateTime object that is set to the first second of the year 2014, which of the following samples will correctly return a date in the format '2014-01-01 00:00:01'?
Easy peasy, Option C is the winner. I wonder if the exam writer has a sense of humor, though. Maybe they'll throw in a trick question just to keep us on our toes.
I'm not sure, but I think D) $date = date('Y-m-d H:i:s', $datetime); might also work. It seems like it could convert the DateTime object to the correct format.
Stefania
2 months agoRobt
1 months agoMeaghan
1 months agoPamella
1 months agoAnnice
2 months agoJanna
2 months agoVeta
19 days agoSilvana
28 days agoMollie
1 months agoRicarda
3 months agoMariann
1 months agoChauncey
1 months agoKimbery
2 months agoCorinne
2 months agoKenneth
2 months agoHannah
2 months agoMose
3 months agoSusana
3 months agoMyong
3 months agoVanna
4 months ago