Re: [PHP] getting a date 25 years back

2004-12-14 Thread Mailit, LLC
You should do date arithmetic using the Unix date format (number of seconds since 1970). I think these string format dates are not appropriate. Mario Merlin wrote: Hi there, I am trying to create a date which is 25 years back from today. The purpose of this is to be able to query a mysql databas

Re: [PHP] getting a date 25 years back

2004-12-14 Thread John Holmes
Merlin wrote: Hi there, I am trying to create a date which is 25 years back from today. The purpose of this is to be able to query a mysql database "date" field for columns smaller than this date. I tried this: $years = 25; $start_from = date("Y-m-d",strtotime("- ".$years." year")); Somehow it a

Re: [PHP] getting a date 25 years back

2004-12-14 Thread Jason Wong
On Wednesday 15 December 2004 03:21, Merlin wrote: > I am trying to create a date which is 25 years back from today. The purpose > of this is to be able to query a mysql database "date" field for columns > smaller than this date. > > I tried this: > $years = 25; > $start_from = date("Y-m-d",strtoti

Re: [PHP] getting a date 25 years back

2004-12-14 Thread John Nichel
Merlin wrote: Hi there, I am trying to create a date which is 25 years back from today. The purpose of this is to be able to query a mysql database "date" field for columns smaller than this date. I tried this: $years = 25; $start_from = date("Y-m-d",strtotime("- ".$years." year")); Somehow it a

Re: [PHP] getting a date 25 years back

2004-12-14 Thread John Nichel
Merlin wrote: Hi there, I am trying to create a date which is 25 years back from today. The purpose of this is to be able to query a mysql database "date" field for columns smaller than this date. I tried this: $years = 25; $start_from = date("Y-m-d",strtotime("- ".$years." year")); Somehow it a

Re: [PHP] getting a date 25 years back

2004-12-14 Thread Merlin
Richard Lynch wrote: Merlin wrote: I am trying to create a date which is 25 years back from today. The purpose of this is to be able to query a mysql database "date" field for columns smaller than this date. I tried this: $years = 25; //> $start_from = date("Y-m-d",strtotime("- ".$years." year"));

Re: [PHP] getting a date 25 years back

2004-12-14 Thread Richard Lynch
Merlin wrote: > I am trying to create a date which is 25 years back from today. The > purpose of > this is to be able to query a mysql database "date" field for columns > smaller > than this date. > > I tried this: > $years = 25; //> $start_from = date("Y-m-d",strtotime("- ".$years." year")); > > S