Re: [PHP] Re: Formating datevariables...

2002-07-24 Thread Ragnar
Hi, i dont know if im always going to use mysql, thow your solution to my problem will be something like this: SELECT DATE_FORMAT( endret_dato, \"%d%m%Y\" ) as endret_dato , headline , news from rnr_news order by endret_dato desc limit " . $index . "," . ($index+10)); Thanx for your help! -R "

RE: [PHP] Re: Formating datevariables...

2002-07-23 Thread John Holmes
> Sure using MySQL specific calls is faster but makes you more dependant > on MySQL and thus makes your application less portable to other databases. > > Cameron Of course. It depends on your application. I know I'm only going to use MySQL for the programs I'm doing now, so I can use this _faste

Re: [PHP] Re: Formating datevariables...

2002-07-23 Thread Cameron McKay
Sure using MySQL specific calls is faster but makes you more dependant on MySQL and thus makes your application less portable to other databases. Cameron John Holmes wrote: > > > Did you even read the replies? Why are you going to do a bunch of string > manipulation, mktime, and date calls i

RE: [PHP] Re: Formating datevariables...

2002-07-23 Thread John Holmes
> Thanx for the help.. > > I ended up with this solution ;) > > $dag = substr ( $row['endret_dato'], 7, 2 ); > $mnd = substr ( $row['endret_dato'], 4, 2 ); > $aar = substr ( $row['endret_dato'], 0, 4 ); > > date ("dmY", mktime(0,0,0,$mnd,$dag,$aar) ) Did you even read the replies? Why are you

[PHP] Re: Formating datevariables...

2002-07-23 Thread Ragnar
Thanx for the help.. I ended up with this solution ;) $dag = substr ( $row['endret_dato'], 7, 2 ); $mnd = substr ( $row['endret_dato'], 4, 2 ); $aar = substr ( $row['endret_dato'], 0, 4 ); date ("dmY", mktime(0,0,0,$mnd,$dag,$aar) ) -R "Ragnar" <[EMAIL PROTECTED]> wrote in message [EMAIL PROT

[PHP] Re: Formating datevariables...

2002-07-22 Thread David Robley
In article <[EMAIL PROTECTED]>, [EMAIL PROTECTED] says... > I have a column in a mysql table with a timestamp. The value of this column > is for instance: > > 20020722185242 > > How do i change the format on this to "DDMM" (22072002) in php? > > Thanx > > -R You can do it as you get it o