[PHP] Dates and Mysql

2008-12-10 Thread VamVan
Hello Gang, I have a Mysql table which has timestamp for the date the record was created. I was wondering how is it possible for me to query the table to retrieve all the records that are one week less than the time stamp? Thanks, V

Re: [PHP] Dates and Mysql

2008-12-10 Thread Micah Gersten
VamVan wrote: Hello Gang, I have a Mysql table which has timestamp for the date the record was created. I was wondering how is it possible for me to query the table to retrieve all the records that are one week less than the time stamp? Thanks, V I'm assuming you meant get records

Re: [PHP] Dates and Mysql

2008-12-10 Thread Chris
VamVan wrote: Hello Gang, I have a Mysql table which has timestamp for the date the record was created. I was wondering how is it possible for me to query the table to retrieve all the records that are one week less than the time stamp?

Re: [PHP] Dates and Mysql

2008-12-10 Thread Kevin Waterson
This one time, at band camp, VamVan [EMAIL PROTECTED] wrote: I was wondering how is it possible for me to query the table to retrieve all the records that are one week less than the time stamp? SELECT DATE_SUB(date_time_column, INTERVAL 1 WEEK) FROM your_table;

[PHP] Dates Again

2008-03-31 Thread VamVan
Hello All, I have a date in 2008-03-29 12:15:00 format. - How can I reduce one day from it? - How can I reduce one hour from it? - How can I add 1 hour to today's date? Thanks

Re: [PHP] Dates Again

2008-03-31 Thread Zoltán Németh
VamVan írta: Hello All, I have a date in 2008-03-29 12:15:00 format. - How can I reduce one day from it? - How can I reduce one hour from it? - How can I add 1 hour to today's date? Thanks just convert it to a timestamp with strtotime() then you can manipulate it by

Re: [PHP] Dates Again

2008-03-31 Thread Ray Hauge
Zoltán Németh wrote: VamVan írta: Hello All, I have a date in 2008-03-29 12:15:00 format. - How can I reduce one day from it? - How can I reduce one hour from it? - How can I add 1 hour to today's date? Thanks just convert it to a timestamp with strtotime() then you can

Re: [PHP] Dates Again

2008-03-31 Thread Larry Garfield
On Monday 31 March 2008, Zoltán Németh wrote: VamVan írta: Hello All, I have a date in 2008-03-29 12:15:00 format. - How can I reduce one day from it? - How can I reduce one hour from it? - How can I add 1 hour to today's date? Thanks just convert it to a timestamp

[PHP] Dates and different time zones

2007-04-10 Thread Niklas Karlsson
Hello, I am creating an international site that is going to get used in both American and Europe. And I wonder how to handle the different time zones, because I want the date and time to be correct after the place your using the application. I now have the date_default_timezone_set() to

RE: [PHP] Dates and different time zones

2007-04-10 Thread Jay Blanchard
[snip] So a wonder who to handle different time zones? Have any of your experience of this? [/snip] The server lives in one time zone and therefore cannot handle multiples unless there is some new widget available for this. There are a couple of methods available; 1. Use JavaScript to capture

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Davey
Niklas Karlsson wrote: I am creating an international site that is going to get used in both American and Europe. And I wonder how to handle the different time zones, because I want the date and time to be correct after the place your using the application. I now have the

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
- Original Message - From: Richard Davey [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 3:43 PM Subject: Re: [PHP] Dates and different time zones Niklas Karlsson wrote: I am creating an international site that is going to get used in both American

Re: [PHP] Dates and different time zones

2007-04-10 Thread Lester Caine
Satyam wrote: Store all of your dates as GMT. Perform all date based calculations around GMT also, and then offset the values for localised display only. This way you only need to store the GMT offsets for each user, i.e. GMT+1 or GMT-8 when it comes to displaying the dates to them. The

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
- Original Message - From: Lester Caine [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 4:37 PM Subject: Re: [PHP] Dates and different time zones Satyam wrote: Store all of your dates as GMT. Perform all date based calculations around GMT also

RE: [PHP] Dates and different time zones

2007-04-10 Thread Niklas Karlsson
Thanks for good answers. Okay, so I should set the default time zone to central GMT time, and then save GMT offset for every user. This sounds realistic, because I don't think that I need to correct the time for users that doesn't login. So, if I now have the GMT offset for every user, how do I

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Davey
Niklas Karlsson wrote: Okay, so I should set the default time zone to central GMT time, and then save GMT offset for every user. This sounds realistic, because I don't think that I need to correct the time for users that doesn't login. So, if I now have the GMT offset for every user, how do I

Re: [PHP] Dates and different time zones

2007-04-10 Thread Lester Caine
Satyam wrote: Of cause the major fault with this is that it can only display the CURRENT time offset. You *ALSO* need the users Daylight Saving Zone as well. This has been giving us great fun since the winter dates and times need a different offset to the summer ones. Something that

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
- Original Message - From: Niklas Karlsson [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 5:32 PM Subject: RE: [PHP] Dates and different time zones Thanks for good answers. Okay, so I should set the default time zone to central GMT time, and then save

Re: [PHP] Dates and different time zones

2007-04-10 Thread Satyam
You are totally right, I am sorry. I would hate to miss my plane or train due to such mistake. Satyam - Original Message - From: Lester Caine [EMAIL PROTECTED] To: php-general@lists.php.net Sent: Tuesday, April 10, 2007 6:29 PM Subject: Re: [PHP] Dates and different time zones

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 11:49 am, Satyam wrote: You are totally right, I am sorry. I would hate to miss my plane or train due to such mistake. Can somebody with way more karma than me put in an RFC to just NUKE daylight savings? Pretty please? Thanks! Whatever alleged benefits there are,

Re: [PHP] Dates and different time zones

2007-04-10 Thread Richard Lynch
On Tue, April 10, 2007 11:38 am, Satyam wrote: In PHP dates are stored as seconds from an arbitrary zero set at Jan 1st, 1970, so does MySql with date/time values though it shows them formatted but nitpick: I don't think MySQL uses Unix timestamp internally, as it's quite capable of storing

Re: [PHP] Dates before 1970

2006-04-17 Thread Richard Lynch
Call me crazy, but I think that: $time = 0x; //largest INT possible echo date('m/d/Y h:i:s a', $time); would be very revealing. On Thu, April 13, 2006 10:26 pm, Suhas wrote: This will definitely solve one way but still other is there, How to get that -ve number which starts at

Re: [PHP] Dates before 1970

2006-04-17 Thread tedd
At 6:43 PM -0500 4/17/06, Richard Lynch wrote: Call me crazy, but I think that: $time = 0x; //largest INT possible echo date('m/d/Y h:i:s a', $time); would be very revealing. H. Is: 12/31/1969 06:59:59 pm Yes, it is -- I remember what I was doing then. It was six months after I

[PHP] Dates before 1970

2006-04-13 Thread Suhas
Hello, I have a project that deals with the date time stamps since 1900 (and past), any suggestions about a good class that handles Date Time Format before 1970. I really like date() function and want something similar. Thanks in advance! SP -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Dates before 1970

2006-04-13 Thread Rasmus Lerdorf
Suhas wrote: Hello, I have a project that deals with the date time stamps since 1900 (and past), any suggestions about a good class that handles Date Time Format before 1970. I really like date() function and want something similar. date() uses Unix timestamps which on most Unix platforms

Re: [PHP] Dates before 1970

2006-04-13 Thread Suhas
This will definitely solve one way but still other is there, How to get that -ve number which starts at 1/1/1900 at 00:00 AM = 0 I need to be able to convert back and forth as there are some calculations to be done on date field, But this is very interesting.. Thx SP On 4/13/06, Rasmus Lerdorf

Re: [PHP] Dates before 1970

2006-04-13 Thread chris smith
I have a project that deals with the date time stamps since 1900 (and past), any suggestions about a good class that handles Date Time Format before 1970. I really like date() function and want something similar. If you're using a database at all, most of them will handle any sort of dates.

[PHP] Dates problem

2005-04-27 Thread Mario de Frutos Dieguez
Hi! I have a problem with dates. I have a function that sum a duration in laboral days to an initial date. The problem come when the function reaches the last sunday of October, the data remains in the last sunday of October and make an infinite loop. The functions works fine i have test in

Re: [PHP] Dates problem

2005-04-27 Thread Petar Nedyalkov
On Wednesday 27 April 2005 09:17, Mario de Frutos Dieguez wrote: Hi! I have a problem with dates. I have a function that sum a duration in laboral days to an initial date. The problem come when the function reaches the last sunday of October, the data remains in the last sunday of October

Re: [PHP] Dates problem

2005-04-27 Thread Mario de Frutos Dieguez
Petar Nedyalkov escribió: On Wednesday 27 April 2005 09:17, Mario de Frutos Dieguez wrote: Hi! I have a problem with dates. I have a function that sum a duration in laboral days to an initial date. The problem come when the function reaches the last sunday of October, the data remains in the

[PHP] Dates, times, timezones...

2005-01-19 Thread Bruno B B Magalhães
Hi everybody, How do you save the date and time in the database? Time stamp or date and time? GMT timezone or the server timezone, or maybe the configs timezone? And when displaying apply user timezone to the GMT date? I think it's easier to save in timestamp format, so it's easy to convert to

[PHP] dates, time stamps, multiple servers, locale, etc

2004-01-29 Thread Justin French
Hi all, I'm looking for a clear, dependable way to work with dates in a web application. There are two types of dates that I can see I'll need: a) a timestamp for 'now' generated by the server (eg used on a last updated field) b) a timestamp for a user-specified date, like 2003-11-28 13:45:59

[PHP] Dates then 1970

2003-11-03 Thread Mark McCulligh
What function(s) would you use if you want to take someone's birth day and format it on display. I have always used strtotime, then strftime but it doesn't work if someone was born in 1939. strtotime returns -1. What function would you use to take the input string 1939/11/23 and get the

Re: [PHP] Dates then 1970

2003-11-03 Thread John W. Holmes
Mark McCulligh wrote: What function(s) would you use if you want to take someone's birth day and format it on display. I have always used strtotime, then strftime but it doesn't work if someone was born in 1939. strtotime returns -1. What function would you use to take the input string 1939/11/23

Re: [PHP] Dates

2003-10-03 Thread Payne
Ok, Mayve I need to be a little clear, I under the link below as showing dates. What I need to know how can I take the input of 09-12-1967 and have enter into a mysql data using php as 1967-09-12? Because everything that is past from my form to mysql is not the way it was enter. Would I need

RE: [PHP] Dates

2003-10-03 Thread Jay Blanchard
[snip] Ok, Mayve I need to be a little clear, I under the link below as showing dates. What I need to know how can I take the input of 09-12-1967 and have enter into a mysql data using php as 1967-09-12? Because everything that is past from my form to mysql is not the way it was enter. Would

Re: [PHP] Dates

2003-10-03 Thread Kris Yates
Also, an option is to have that SQL field set as date. With postgres, I can insert 09-12-1967 and the sql server auto converts it to 1967-09-12 upon saving into date field. However, another way is.. ? $date=09-12-1967; $dARR=explode(-, $date); $tmon=$dARR[0]; $tday=$dARR[1]; $tyr=$dARR[2];

[PHP] Dates

2003-10-02 Thread Payne
Hi , This might be mysql question but how can I change a US format date (mm/dd/) to a MySQL Format (/mm/dd). Can I do this will php or will need let say javascript or perl to do this? Payne -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Dates

2003-10-02 Thread Jay Blanchard
[snip] This might be mysql question but how can I change a US format date (mm/dd/) to a MySQL Format (/mm/dd). Can I do this will php or will need let say javascript or perl to do this? [/snip] date(y/m/d); RTFM at http://www.php.net/date -- PHP General Mailing List

Re: [PHP] Dates

2003-10-02 Thread J Morton
date(Y-m-d, strtotime($your_date)) Payne wrote: Hi , This might be mysql question but how can I change a US format date (mm/dd/) to a MySQL Format (/mm/dd). Can I do this will php or will need let say javascript or perl to do this? Payne -- PHP General Mailing List

RE: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Jay Blanchard
[snip] Anytime I try to add a day to the date 2002-01-18, I get a Warning: unexpected error in date() error. Can anyone shed some light on this. [/snip] If you'll shed some code on this, we'll shed some help :^] Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Jay Blanchard
-31 I put in the '+1' and the result is 1970-01-01 I change '2038-01-19' to '2002-01-19' and it works. Which is what the subject of your message was, not [PHP] dates greater than 2038-01-18 create error HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http

RE: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Adam Voigt
was, not [PHP] dates greater than 2038-01-18 create error HTH! Jay -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread John Wards
, August 12, 2002 5:26 PM Subject: RE: [PHP] dates greater than 2002-01-18 create error Dude, did you read the PHP Date manual page? I quote: Note: The valid range of a timestamp is typically from Fri, 13 Dec 1901 20:45:54 GMT to Tue, 19 Jan 2038 03:14:07 GMT. (These are the dates

Re: [PHP] dates greater than 2002-01-18 create error

2002-08-12 Thread Danny Shepherd
: John Wards [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 12, 2002 5:32 PM Subject: Re: [PHP] dates greater than 2002-01-18 create error right am i missing something or is that not just an other Y2K bug waiting to happen? Not that I plan to be coding php in 2038 but my kids might

[PHP] Dates and Date()

2002-07-29 Thread Christopher J. Crane
I believethisto be one way to find out yesterday's date: $tomorrow = mktime (0,0,0,date(m) ,date(d)-1,date(Y)); However, I would like to have a snippet of code to tell me how to get the date of today - 10 days ago. if today is jul 29, 2002, how do I get the date funtion to tell me 10 days

Re: [PHP] Dates and Date()

2002-07-29 Thread Rasmus Lerdorf
$ts = strtotime(-10 days); On Mon, 29 Jul 2002, Christopher J. Crane wrote: I believethisto be one way to find out yesterday's date: $tomorrow = mktime (0,0,0,date(m) ,date(d)-1,date(Y)); However, I would like to have a snippet of code to tell me how to get the date of today - 10 days

Re: [PHP] Dates and Date()

2002-07-29 Thread Analysis Solutions
On Mon, Jul 29, 2002 at 10:51:39AM -0400, Christopher J. Crane wrote: I believethisto be one way to find out yesterday's date: $tomorrow = mktime (0,0,0,date(m) ,date(d)-1,date(Y)); However, I would like to have a snippet of code to tell me how to get the date of today - 10 days ago. You

Re: [PHP] Dates and Date()

2002-07-29 Thread Andrey Hristov
- Original Message - From: Christopher J. Crane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 5:51 PM Subject: [PHP] Dates and Date() I believethisto be one way to find out yesterday's date: $tomorrow = mktime (0,0,0,date(m) ,date(d)-1,date(Y)); However, I

Re: [PHP] Dates and Date()

2002-07-29 Thread Christopher J. Crane
PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 10:59 AM Subject: Re: [PHP] Dates and Date() - Original Message - From: Christopher J. Crane [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 5:51 PM Subject: [PHP] Dates and Date() I believethisto

Re: [PHP] Dates and Date()

2002-07-29 Thread Andrey Hristov
Regards, Andrey - Original Message - From: Christopher J. Crane [EMAIL PROTECTED] To: Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 7:00 PM Subject: Re: [PHP] Dates and Date() Ok here is what I did. $Hist_Time = gmstrftime('%m:%d:%Y', strtotime(-10

Re: [PHP] Dates and Date()

2002-07-29 Thread Christopher J. Crane
very nice... thank you! - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Christopher J. Crane [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 12:04 PM Subject: Re: [PHP] Dates and Date() Use while() with some counter that increments when you have

Re: [PHP] Dates and Date()

2002-07-29 Thread 1LT John W. Holmes
Ok here is what I did. $Hist_Time = gmstrftime('%m:%d:%Y', strtotime(-10 days)); Now I am wondering if there is a way to look for only the last day business days and be returned in an array? What have you tried? How much longer do we have to hold your hand? Not to be too rude or anything,

Re: [PHP] Dates and Date()

2002-07-29 Thread Andrey Hristov
: Monday, July 29, 2002 7:08 PM Subject: Re: [PHP] Dates and Date() very nice... thank you! - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: Christopher J. Crane [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 12:04 PM Subject: Re: [PHP] Dates and Date

Re: [PHP] Dates and Date()

2002-07-29 Thread Andrey Hristov
experiment some not. Kind regards, Andrey Hristov - Original Message - From: 1LT John W. Holmes [EMAIL PROTECTED] To: Christopher J. Crane [EMAIL PROTECTED]; Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 7:12 PM Subject: Re: [PHP] Dates and Date() Ok here

Re: [PHP] Dates and Date()

2002-07-29 Thread 1LT John W. Holmes
you helped him and he got it figured out... ---John Holmes... - Original Message - From: Andrey Hristov [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 12:17 PM Subject: Re: [PHP] Dates and Date() The guy just wanted fast help. It is obvious that he is not advanced

Re: [PHP] Dates and Date()

2002-07-29 Thread Christopher J. Crane
[EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 12:12 PM Subject: Re: [PHP] Dates and Date() Ok here is what I did. $Hist_Time = gmstrftime('%m:%d:%Y', strtotime(-10 days)); Now I am wondering if there is a way to look for only the last day business days

Re: [PHP] Dates and Date()

2002-07-29 Thread Christopher J. Crane
J. Crane [EMAIL PROTECTED]; Andrey Hristov [EMAIL PROTECTED] Cc: [EMAIL PROTECTED] Sent: Monday, July 29, 2002 7:12 PM Subject: Re: [PHP] Dates and Date() Ok here is what I did. $Hist_Time = gmstrftime('%m:%d:%Y', strtotime(-10 days)); Now I am wondering if there is a way to look

Re: [PHP] Dates

2002-05-28 Thread Miguel Cruz
On Tue, 28 May 2002, Jeroen Timmers wrote: 2002-10-9 and 2002-11-16 Is there a function to see how many day's between thore date's is? (strtotime($date1) - strtotime($date2)) / 86400 miguel -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Dates

2002-05-28 Thread Jared Boelens
; // in seconds That will do it but you could simplfy it with some more advanced techniques. -Jared -Original Message- From: Jeroen Timmers [mailto:[EMAIL PROTECTED]] Sent: Tuesday, May 28, 2002 2:17 PM To: [EMAIL PROTECTED] Subject: [PHP] Dates i have two dates for example 2002-10-9

Re: [PHP] Dates

2002-05-28 Thread 1LT John W. Holmes
... Then you'll have a column 'Difference' in your result that contains the difference between the two dates in days. ---John Holmes... - Original Message - From: Jeroen Timmers [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Tuesday, May 28, 2002 2:16 PM Subject: [PHP] Dates i have two

[PHP] DATES in DIFFERENT LANGUAGES

2002-04-12 Thread Declan Kenny
Hi all, Is it possible to get dates in different languages i.e. date (j F) would usually return, in the case, 13 April can I make it display the date in French for example?? Thanks Declan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] Re: Any easy way to go from MySQL Dates to PHP dates?

2002-03-31 Thread Ernesto
Use strtotime(). $result = mysql_query(SELECT datefield FROM mytable); $row = mysql_fetch_array($result); $datevar=strtotime($row['datefield']); echo date('m-d-Y', $datevar); Regards, David Johansen [EMAIL PROTECTED] wrote: I was just wondering if there's any way to work with dates returned

[PHP] Any easy way to go from MySQL Dates to PHP dates?

2002-03-30 Thread David Johansen
I was just wondering if there's any way to work with dates returned from a MySQL query in PHP. Right now I do all of different stuff in my MySQL query but it's really cumbersome, so I would like to be able to do it all with PHP. Is there any way to do that? Thanks, Dave Here's my MySQL query:

Re: [PHP] Any easy way to go from MySQL Dates to PHP dates?

2002-03-30 Thread Jason Wong
On Sunday 31 March 2002 04:04, David Johansen wrote: I was just wondering if there's any way to work with dates returned from a MySQL query in PHP. Right now I do all of different stuff in my MySQL query but it's really cumbersome, so I would like to be able to do it all with PHP. Is there

[PHP] dates only in the future

2001-09-25 Thread Kristjan Kanarik
Good afternoon, I'm looking for a function which enables me to allow user only to enter those dates which are still to come. In my head I have three select things... one for day, one for month and one for year. In order to prevent the user from submitting the form with the date which is in past,

RE: [PHP] dates only in the future

2001-09-25 Thread Boget, Chris
I'm looking for a function which enables me to allow user only to enter those dates which are still to come. In my head I have three select things... one for day, one for month and one for year. In order to prevent the user from submitting the form with the date which is in past, I need

[PHP] dates problem

2001-09-08 Thread Nikola Veber
I'm having a prowith determing a time interval. I need to find out how many seconds, minutes, days have passed since a cpecific date (1.1.1980.), but when I pass that dade to a time stamp , I get 1983.315529200. How am I suposed to handle the year (1983.) o there is smething else ? I think the

[PHP] dates

2001-04-16 Thread Alvin Tan
hi all, a little stuck here. trying to pull a bunch of unix timestamps out and show only those that show up today. problem is that when i hit the first match, the rest of the dates don't show. code follows: == $sql = "SELECT * FROM dates"; $result = mysql_query($sql) or

Re: [PHP] dates

2001-04-16 Thread CC Zona
In article [EMAIL PROTECTED], [EMAIL PROTECTED] ("Alvin Tan") wrote: a little stuck here. trying to pull a bunch of unix timestamps out and show only those that show up today. problem is that when i hit the first match, the rest of the dates don't show. code follows:

RE: [PHP] dates

2001-04-16 Thread Maxim Maletsky
To: Php-General Subject: [PHP] dates hi all, a little stuck here. trying to pull a bunch of unix timestamps out and show only those that show up today. problem is that when i hit the first match, the rest of the dates don't show. code follows: == $sql = "SELECT * FROM

[PHP] dates from db

2001-03-07 Thread Matt Davis
I am calling on a number of fields from my db one of which is a date. When the date displays it is in the following format -MM-DD 00:00:00 I Want it to only display the date and not the time like this -MM-DD Is it possible to remove the time when calling on it from the db can anyone

RE: [PHP] dates from db

2001-03-07 Thread Jon Haworth
: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: 07 March 2001 13:35 To: Php Mailing List Subject: [PHP] dates from db I am calling on a number of fields from my db one of which is a date. When the date displays it is in the following format -MM-DD 00:00:00 I Want it to only display the date

RE: [PHP] dates from db

2001-03-07 Thread Mark Roedel
-Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 7:35 AM To: Php Mailing List Subject: [PHP] dates from db I am calling on a number of fields from my db one of which is a date. When the date displays it is in the following format

RE: [PHP] dates from db

2001-03-07 Thread Eric Naujock
don;t have to count on your database supporting it. "Mark Roedel" [EMAIL PROTECTED] 03/07/01 09:08AM -Original Message- From: Matt Davis [mailto:[EMAIL PROTECTED]] Sent: Wednesday, March 07, 2001 7:35 AM To: Php Mailing List Subject: [PHP] dates from db I am calling on a n

[PHP] dates

2001-02-19 Thread Phil Daintree
This is a function I use: function DateDiff ($Date1, $Date2, $Period) { /* expects dates in the format d/m/y - period can be one of 'd','w','y','m' months are assumed to be 30 days and years 365.25 days This only works provided that both dates are after 1970. Also only works for dates up to

[PHP] dates

2001-02-18 Thread Julian Rockeu
Anyone know how to use the PHP date functions to work out the difference between two timestamps? For example.. Figure out the number of seconds, minutes, hours, days, months and years between 5th October 2001 14:20:10 and 26th February 1998 109:54:10 Help much appreciated! thanks Julian

Re: [PHP] dates

2001-02-18 Thread eschmid+sic
On Sun, Feb 18, 2001 at 04:40:08PM -0700, Julian Rockeu wrote: Anyone know how to use the PHP date functions to work out the difference between two timestamps? For example.. Figure out the number of seconds, minutes, hours, days, months and years between 5th October 2001 14:20:10

Re: [PHP] dates

2001-02-18 Thread Julian Rockey
Yes I had a look at mktime() and date() and tried to think of an easy way to do it but couldn't... you can convert both dates to a UNIX timestamp (millseconds after whatever date) then do a subtraction... and then what? Easy to work out number of days from millseconds as a day's length is

Re: [PHP] dates

2001-02-18 Thread eschmid+sic
On Sun, Feb 18, 2001 at 06:54:02PM -0700, Julian Rockey wrote: Yes I had a look at mktime() and date() and tried to think of an easy way to do it but couldn't... you can convert both dates to a UNIX timestamp (millseconds after whatever date) then do a subtraction... and then what? Easy to