ricukins2 Posted April 23, 2017 Report Share Posted April 23, 2017 Sveicināti, esmu saskāries ar problemu, kuru pats nespēju salabot, lai vai mēģināju kādus 30 internetā piedāvātos variantus. Lieta tāda, ja kods ir $date = $s_date; echo date('d/m/Y', $date) ja kods ir parasts, $shout->s_date , bez pārveidojuma uz date, tad rādas Kādam ieteikumi? Paldies jau iepriekš. Quote Link to comment Share on other sites More sharing options...
Val Posted April 23, 2017 Report Share Posted April 23, 2017 echo date('d/m/Y', $shout->s_date); Ieliec šeit savus 30 variantus. Paldies. Quote Link to comment Share on other sites More sharing options...
aaxc Posted April 24, 2017 Report Share Posted April 24, 2017 Var arī šādi: $date = '1492963481'; $dt = new DateTime("@$date"); echo $dt->format('d.m.Y'); Quote Link to comment Share on other sites More sharing options...
ricukins2 Posted April 24, 2017 Author Report Share Posted April 24, 2017 (edited) Paldies aaxc, tavs posts noderēja, tika izmantots, lai iegūtu vajadzīgo rezultātu, bet bij jāveic vēl dažas darbības pašam. Varat taisīt TC Edited April 24, 2017 by ricukins2 Quote Link to comment Share on other sites More sharing options...
Recommended Posts
Join the conversation
You can post now and register later. If you have an account, sign in now to post with your account.