Jump to content
php.lv forumi

Recommended Posts

Posted

Man ir string formātā date (dd.mm.yyyy) un time (mm.hh).

Kā šos divus var ērti sakombinēt vienā, lai iegūtu pareizu unixtimestamp, kas atbilstu attiecīgai dienai un laikam?

Kā arī - kā pēc tam var atkombinēt atpakaļ?

Posted

viis atkariigs ko velies dariit, ja saglabat ieksh DB tad labak parveidot par SQL formata DATETIME , vai DATE un TIME formatu,

ja vajag ko skaitljot tad skaties Uz time funkcijam , strtotime(), mktime()..

Posted

vienmer esmu teicis ka DB datumus labak glabat Tam paredzetajaa formata...

Tas dod daudz plasaku iespeju manupulet ar datiem , meklet , kartot, atlasiit utt...

Piemeram kaa tu saglabasi dzimsanas datus t UNIX timestap formataa , cilvekam kas dzimis 1969.g 12 .12 ???? Ljoti liels procents ka dabuusi galiigi aplamu rezultatu ( ne noteikti bet nu ljoti iespejams)

Tapec jai ir izdomats Specefisks formats ......

Join the conversation

You can post now and register later. If you have an account, sign in now to post with your account.

Guest
Reply to this topic...

×   Pasted as rich text.   Paste as plain text instead

  Only 75 emoji are allowed.

×   Your link has been automatically embedded.   Display as a link instead

×   Your previous content has been restored.   Clear editor

×   You cannot paste images directly. Upload or insert images from URL.

Loading...
×
×
  • Create New...