Jump to content
php.lv forumi

paliidziet luudzu ar tipa replace scriptu(asap)


Recommended Posts

Posted

datubaazee ir tabula, no 3. laukiem

 

|___id___|__datefrom__|__dateto__|

 

 

 

probza taada, ka datefrom and dateto (abi varchar) ir salikti tipa taadi:

 

datefrom: 24/09/05

dateto: 31/09/05

 

vajadzeetu baigi paliidziibu kaa vareetu vinjus paarveidot aatri par tipa:

 

datefrom: 2005-09-24

dateto: 2005-09-31

 

any ideas? :huh:

Posted

pienemot ka mysql

select 
        str_to_date(datefrom,'%d/%m/%y') as datefrom, 
        str_to_date(dateto,'%d/%m/%y') as dateto
from
        tablename

Posted

vispar kaapeec date jaalie kaa varchar tips?

panjem nomaini uz date un peec tam ar sql funkciju date_format(dateto, "%Y-.%m-%d")

varbuut date_format sintakse nav isiti korekta, bet to var manuaali apskatiities.

Posted
vispar kaapeec date jaalie kaa varchar tips?

 

Nu man vins cudiks taadu tabulu vot iedeva kur datums kaa varchars ielikts ir <_<

Posted

nu uz date vajadzeetu agraak vai veelaak paariet. tikmeer labaak php pusee paarkonverteet.

×
×
  • Create New...