RE: [PHP] Date problem

2002-12-03 Thread James Coates
At 18:44 02/12/2002 -0500, John W. Holmes wrote: Can you help me for this ? Yeah, I already did: Perhaps you could throw a clue my way, in that case. I have an actor database (mySQL again) which has actor dates of birth in '-MM-DD' format. I want to be able to query against that

Re: [PHP] Date problem

2002-12-03 Thread Jason Wong
On Tuesday 03 December 2002 18:29, James Coates wrote: Perhaps you could throw a clue my way, in that case. I have an actor database (mySQL again) which has actor dates of birth in '-MM-DD' format. I want to be able to query against that ignoring the year: * give me actors who have

[PHP] date

2002-12-03 Thread Shaun
Hi, please could someone tell me how i can return a month in text from an int ie getMonth(12) returns Decmber. Is this possible? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date

2002-12-03 Thread DL Neil
Hi Shaun, please could someone tell me how i can return a month in text from an int ie getMonth(12) returns Decmber. Is this possible? No. If you want to stick with this, write your own function to look up a text array. If the 12 is part of more data coming in from a form or db (for

RE: [PHP] date

2002-12-03 Thread Daniel Masson
Take a look at mktime() and date() ... echo date(M,mktime(0,0,0,12,1,2002)) The first param of date is the format, M means month in string format not number of month, and mktime paramas are: int hour, int minute, int second, int month, int day, int year This should work Hi, please

Re: [PHP] date

2002-12-03 Thread William Bailey
On Tuesday 03 December 2002 13:57, Shaun wrote: Hi, please could someone tell me how i can return a month in text from an int ie getMonth(12) returns Decmber. Is this possible? Thanks for your help have a look at the mktime() function. Use this along with the date() function to get

Re: [PHP] date

2002-12-03 Thread Shaun
Thanks for your reply, i am doing a fitnerss site and i want to display the muscle of the month. This works fine with the following code: function get_muscle(){ $month = date(F); $query = SELECT * FROM Table_Muscle WHERE Muscle_Month = '$month'; $result = mysql_query($query);

Re: [PHP] Date problem

2002-12-03 Thread James Coates
At 19:32 03/12/2002 +0800, Jason Wong wrote: Assuming the column holding the the birthday is called 'birthday': [snip] Many thanks! * give me actors whose birthdays fall between two dates (ie: Aries) This one is easy, use the BETWEEN clause in your SELECT statement. Consult manual for

Re: [PHP] Date problem

2002-12-02 Thread Rosen
Thanks for this, I understand how to update in date in database, but I need when I get date from database to increase or decrease before to save in database. Can you help me for this ? John W. Holmes [EMAIL PROTECTED] wrote in message

RE: [PHP] Date problem

2002-12-02 Thread John W. Holmes
Thanks for this, I understand how to update in date in database, but I need when I get date from database to increase or decrease before to save in database. Can you help me for this ? Yeah, I already did: You can select out the date you have now, use strtotime() to make it into a unix

[PHP] Date problem

2002-12-01 Thread Rosen
Hi, I have one problem: Date field in MySql database with value as 2002-31-12. I want to increment or decrement this date and to put it again in table. Can someone help me to increment or decrement date with some days? Thanks, Rosen -- PHP General Mailing List (http://www.php.net/) To

RE: [PHP] Date problem

2002-12-01 Thread John W. Holmes
I have one problem: Date field in MySql database with value as 2002-31-12. I want to increment or decrement this date and to put it again in table. Can someone help me to increment or decrement date with some days? UPDATE yourtable SET yourcolumn = yourcolumn + INTERVAL 1 DAY WHERE ...

Re: [PHP] Date problem

2002-12-01 Thread Rosen
Thanks, But I need before to save date in database to do some checks with the inc/dec date. Cal you help me ? Thanks, Rosen John W. Holmes [EMAIL PROTECTED] wrote in message 002301c29960$21d6a360$7c02a8c0@coconut">news:002301c29960$21d6a360$7c02a8c0@coconut... I have one problem: Date field

RE: [PHP] Date problem

2002-12-01 Thread John W. Holmes
What exactly do you want to do? I'm not a mind reader... ---John Holmes... -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Date problem Thanks, But I need before to save date in database

Re: [PHP] Date problem

2002-12-01 Thread Rosen
01c29965$7862e950$7c02a8c0@coconut... What exactly do you want to do? I'm not a mind reader... ---John Holmes... -Original Message- From: Rosen [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 01, 2002 12:54 PM To: [EMAIL PROTECTED] Subject: Re: [PHP] Date problem Thanks,

Re: [PHP] Date problem

2002-12-01 Thread Justin French
on 02/12/02 9:59 AM, Rosen ([EMAIL PROTECTED]) wrote: I want to get date from database, to increment ot decrement it with some days, to show the date and after thath if user confirm it to save it to database. And in what format is the date currently stored? -MM-DD? MySQL timestamp? Unix

Re: [PHP] Date problem

2002-12-01 Thread Rosen
It's in -MM-YY Justin French [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... on 02/12/02 9:59 AM, Rosen ([EMAIL PROTECTED]) wrote: I want to get date from database, to increment ot decrement it with some days, to show the date and after thath if user

RE: [PHP] Date problem

2002-12-01 Thread John W. Holmes
I want to get date from database, to increment ot decrement it with some days, to show the date and after thath if user confirm it to save it to database. There are a ton of ways you can do it. You can select the date and it's inc/dec value in the same statement: SELECT datecol, datecol +

[PHP] date queries

2002-11-24 Thread Michael P. Carel
Hi to all, Sorry for this post I know this is a mysql related question, i just wanna have other comments.suggestions from this list. I have a problem regarding date queries in mysql. Im creating inventory reports in PHP. I want to query from the date field a weekly report for a specific month,

RE: [PHP] date queries

2002-11-24 Thread John W. Holmes
Sorry for this post I know this is a mysql related question, i just wanna have other comments.suggestions from this list. I have a problem regarding date queries in mysql. Im creating inventory reports in PHP. I want to query from the date field a weekly report for a specific month, year,

Re: [PHP] date

2002-11-20 Thread Matthieu Le Corre
; } Le Mardi 19 Novembre 2002 15:10, Edward Peloke a ¨¦crit : I am pulling from a datetime field in mysql. The actual data looks like this: 2002-11-30 00:00:00 When I output the data to the page, I want it to appear as 11/30/2002. I want to use a php date format. I do not want it formatted

[PHP] date

2002-11-19 Thread Edward Peloke
I am pulling from a datetime field in mysql. The actual data looks like this: 2002-11-30 00:00:00 When I output the data to the page, I want it to appear as 11/30/2002. I want to use a php date format. I do not want it formatted as it comes out of the db. But date(m/d/y, $myrow[departdate

Re: [PHP] date

2002-11-19 Thread Support @ Fourthrealm.com
to use a php date format. I do not want it formatted as it comes out of the db. But date(m/d/y, $myrow[departdate]) returns 12/31/69. How can I do this? THanks, Eddie -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date

2002-11-19 Thread 1LT John W. Holmes
I am pulling from a datetime field in mysql. The actual data looks like this: 2002-11-30 00:00:00 When I output the data to the page, I want it to appear as 11/30/2002. I want to use a php date format. I do not want it formatted as it comes out of the db. But date(m/d/y, $myrow[departdate

[PHP] date comparison

2002-11-10 Thread Michael P. Carel
hi to all again, I have a problem here again regarding the date comparison. I need to check the most recent date that was entered in mysql database in date format (Y-m-d), if the datetoday is a day or two days in advanced compared to the queried date. I need to make sure that the next

RE: [PHP] date comparison

2002-11-10 Thread John W. Holmes
I have a problem here again regarding the date comparison. I need to check the most recent date that was entered in mysql database in date format (Y-m-d), if the datetoday is a day or two days in advanced compared to the queried date. I need to make sure that the next inserted date in the

Re: [PHP] date comparison

2002-11-10 Thread Justin French
Is it too late to change the way you insert dates into the DB? I really think the unix timestamp is the easiest way to store dates... comparisons are easy, because everything is in seconds, and using date() gives you the ability to re-format your dates over and over again for presentation

[PHP] date problem

2002-11-09 Thread Michael P. Carel
to all; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date problem

2002-11-09 Thread Maxim Maletsky
say it again? -- Maxim Maletsky [EMAIL PROTECTED] On Sun, 10 Nov 2002 12:37:48 +0800 Michael P. Carel [EMAIL PROTECTED] wrote: to all; -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

[PHP] date validation problem!

2002-10-31 Thread ppf
Hi all: I am having some problem with date validation I am trying to validate the date in a form Field I had provided a text field for date, so have to expect all the different possible entry, When i tried with checkdate() method it needs the parametes in (int month,int date, int year). It make

RE: [PHP] date validation problem!

2002-10-31 Thread Jon Haworth
Hi, I had provided a text field for date, so have to expect all the different possible entry, This is generally a *very* bad idea. If a visitor to your site enters 4/3/01, do they mean the 4th March or the 3rd April? I find the best thing to do is provide three drop-downs: one contains

Re: [PHP] date validation problem!

2002-10-31 Thread 1LT John W. Holmes
I am having some problem with date validation I am trying to validate the date in a form Field I had provided a text field for date, so have to expect all the different possible entry, When i tried with checkdate() method it needs the parametes in (int month,int date, int year). It make the

[PHP] Date formatting from a mySQL timestamp

2002-10-16 Thread Ricardo Fitzgerald
Hi, I have the following query : for($i = 0; $i =$num_results; $i++) { $row = mysql_fetch_object($result); echo table width =\100%\ border =\0\ cellpadding = \3\\n .tr\n .td bgcolor = \#ee\ align = \left\$row-id/td\n .td bgcolor = \#ee\ align = \left\$row-Nombre/td\n

Re: [PHP] Date formatting from a mySQL timestamp

2002-10-16 Thread 1LT John W. Holmes
timestamps are in a MMDDHHMMSS format. If you've used a TIMESTAMP, DATE, or DATETIME column in MySQL, then you have a MySQL timestamp. The MySQL timestamp is not compatible with the PHP date() function, it is expecting a Unix timestamp. So...the solution is one of two things. You can use an INT

[PHP] Date to find next Friday

2002-10-08 Thread Liam . Gibbs
Using the date function, what's the easiest way to find the date of the next Friday? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date to find next Friday

2002-10-08 Thread 1LT John W. Holmes
Using the date function, what's the easiest way to find the date of the next Friday? Why use the date() function? $next_friday = strtotime(next friday); ---John Holmes... -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Date to find next Friday

2002-10-08 Thread Liam . Gibbs
Responding to my own message. This is making me a little ticked. I can't think it through. Here's exactly what I need: There are a bunch of series of files (A series, B series, and so on) that are to be released on the first, second, third, fourth, or (if it exists for that month) fifth Friday

Re: [PHP] Date to find next Friday

2002-10-08 Thread Justin French
Ummm, I've read this twice, and don't get it!!! You want to make: - an 'A' file available on the first friday of the month - an 'B' file available on the second friday of the month - an 'C' file available on the third friday of the month - an 'D' file available on the fourth friday of the month

[PHP] Date Arithmetic

2002-10-01 Thread Sascha Braun
I have a small but hard to solve problem to solve. Wrote a Select Query for my webpage. The query should select all values which where written into the DB the last seven Days. I thought everything was working fine, but now the month has changed and everything went wrong. My Select Query is

Re: [PHP] Date Arithmetic

2002-10-01 Thread Robert Cummings
Sascha Braun wrote: I have a small but hard to solve problem to solve. Wrote a Select Query for my webpage. The query should select all values which where written into the DB the last seven Days. I thought everything was working fine, but now the month has changed and everything

Re: [PHP] Date Arithmetic

2002-10-01 Thread Kevin Stone
:26 PM Subject: [PHP] Date Arithmetic I have a small but hard to solve problem to solve. Wrote a Select Query for my webpage. The query should select all values which where written into the DB the last seven Days. I thought everything was working fine, but now the month has changed

RE: [PHP] Date Arithmetic

2002-10-01 Thread John W. Holmes
I have a small but hard to solve problem to solve. Wrote a Select Query for my webpage. The query should select all values which where written into the DB the last seven Days. I thought everything was working fine, but now the month has changed and everything went wrong. My Select Query

[PHP] mysql timestamp and php date

2002-09-30 Thread Bryan Koschmann - GKT
Hello, I have a table with timestamps in mysql. The timestamps of course are in the format of 20020930014535 but I would like to format the output as this: date(l F jS H:i:s, $last_modified) What is the simplest way to do this? I see there are a few ways to convert it, but I was hoping for

[PHP] Re: mysql timestamp and php date

2002-09-30 Thread Jason Young
In my pages, I just format the date from the SQL query: SELECT DATE_FORMAT(last_modified, '%m/%d/%Y %h:%i:%s %p') AS last_modified (...) Look up the DATE_FORMAT on mysql.com to get a list of the arguments. Hope this helps! -Jason Bryan Koschmann - Gkt wrote: Hello, I have a table with

Re: [PHP] Re: mysql timestamp and php date

2002-09-30 Thread Bryan Koschmann - GKT
Hi Jason, I had come across this earlier, and while I can get it to return perfectly, I was more looking for something that I could do without having to pull 2 queries. Err, well wait, I wouldn't have to would I? I have 4 columns: idnum, title, date, news I was just doing a select * from

Re: [PHP] Re: mysql timestamp and php date

2002-09-30 Thread Jason Young
No problem! Refresh MY memory here.. I noticed you didn't return the DATE_FORMAT column AS var .. is that working okay? I seemed to think that it returned a long unwieldy column name.. maybe things are good.. let me know :-D --Jason Bryan Koschmann - Gkt wrote: Hi Jason, I had come

Re: [PHP] Re: mysql timestamp and php date

2002-09-30 Thread Bryan Koschmann - GKT
This is what I am using here: $db = DB::connect(mysql://$username:$password@$hostName/$databaseName); if (DB::iserror($db)) die($db-getMessage()); $sql = SELECT idnum, title, DATE_FORMAT(date, '%W, %M %D \ %l:%i%p'), news FROM newslist ORDER BY idnum DESC; $query = $db-query($sql); if

[PHP] date question

2002-09-29 Thread Jonas Geiregat
I have a date ex 24/08/02 and I need to see if that date is the same date as it is today (only one month later) but 5day's in advanced = that would be 24/09/02 so if(date == date now - 5) {true} else{false} how can I do this right ? -- PHP General

Re: [PHP] date question

2002-09-29 Thread Justin French
Not sure why you need the 5 days in advance bit, but this might give you the tools to work it all out. I prefer to work with dates in unix timestamp format (seconds). To get now, use time() To get next month, there's a kewl function called strtotime(), which converts english phrases into

[PHP] Date-problem?

2002-09-26 Thread Gustavus
Hi, I'm using ImpAkt2 (PHP4, MySql, Apache on W2K) I have update form (which has date-field). So now I have to enter date on format yy.mm.dd (ex. today 02.09.27), and in the database has then correct format -mm-dd. Ok! I have also listing-page, which has date-field (it format is

[PHP] date functions

2002-09-23 Thread Patrick
i got 2 dates and i want to know how many minutes between em,, like: $date1 = date(Y-m-j H:i); $date2 = date(Y-m-j H:i, strtotime(now) + 1800); $minutes = date_something($date1, $date2); echo there are $minutes between, $date1 and $date2; regards patrick -- PHP General Mailing List

Re: [PHP] date functions

2002-09-23 Thread Support @ Fourthrealm.com
Patrick Off the top of my head... Convert both date1 and date2 to unix timestamps, and subtract one from the other. That will give you the number of seconds between them. Then, convert to hours, minutes, etc as required. Peter At 10:38 PM 9/23/2002 +0200, Patrick wrote: i got 2 dates and

Fw: [PHP] date functions

2002-09-23 Thread Kevin Stone
You should be working with UNIX timestamps here. Convert the dates to human readble only after you've done the calcuations. -Kevin - Original Message - From: Patrick [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, September 23, 2002 2:38 PM Subject: [PHP] date functions i got

RE: [PHP] Date Time

2002-09-22 Thread Don Read
On 21-Sep-2002 Patrick wrote: Hi,, my server is located in the US and i live in Sweden, so when i try to run the following command i get a 8hour diffrence,, anyone got any idea of how to solve this? date(Y-m-j) putenv('TZ=Europe/Stockholm'); mktime(0,0,0,1,1,1970); echo

[PHP] Date Concat?

2002-09-20 Thread Rankin, Randy
I have two fields of type date in a MySQL table called training: start_date end_date I can format the date using a select, for example SELECT DATE_FORMAT(start_date, '%M %d, %Y') as start_date, DATE_FORMAT(end_date, '%M %d, %Y') as end_date FROM training

RE: [PHP] Date Concat?

2002-09-20 Thread John Holmes
I have two fields of type date in a MySQL table called training: start_date end_date I can format the date using a select, for example SELECT DATE_FORMAT(start_date, '%M %d, %Y') as start_date, DATE_FORMAT(end_date, '%M %d, %Y') as end_date FROM training

[PHP] Date Time

2002-09-20 Thread Patrick
Hi,, my server is located in the US and i live in Sweden, so when i try to run the following command i get a 8hour diffrence,, anyone got any idea of how to solve this? date(Y-m-j) regards Patrick -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] Date Time

2002-09-20 Thread Tom Rogers
Hi, Saturday, September 21, 2002, 12:30:48 PM, you wrote: P Hi,, P my server is located in the US and i live in Sweden, so when i try to run P the following command i get a 8hour diffrence,, anyone got any idea of how P to solve this? P date(Y-m-j) P regards P Patrick A quick fix that

Re: [PHP] Date Time

2002-09-20 Thread Sascha Cunz
You have to add (or subtract) 28800 seconds to/from current time and use this as the 2nd input to date. echo date(Y-m-j, strtotime(now) + 28800); Sascha Hi,, my server is located in the US and i live in Sweden, so when i try to run the following command i get a 8hour diffrence,, anyone

[PHP] Date(), adjusted for one year

2002-09-18 Thread Support @ Fourthrealm.com
Hi guys, What is the easiest way to get the date of one year from today? Accommodating for leap years is not essential (but would be a nice bonus). Thanks, Peter - - - - - - - - - - - - - - - - - - - - - Fourth Realm Solutions [EMAIL PROTECTED] http://www.fourthrealm.com Tel: 519-739-1652 - -

Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Robert Cummings
Support @ Fourthrealm.com wrote: Hi guys, What is the easiest way to get the date of one year from today? Accommodating for leap years is not essential (but would be a nice bonus). Without leap year adjustment... date( your format string here, time() + 60 * 60 * 24 * 365 ); HTH, Rob. --

Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Jacob Miller
With leap year adjustment... strtotime(+1 year, timestamp); will return a unix timestamp. - Jacob At 01:49 09/19/2002, Robert Cummings wrote: Support @ Fourthrealm.com wrote: Hi guys, What is the easiest way to get the date of one year from today? Accommodating for leap years is not

Re: [PHP] Date(), adjusted for one year

2002-09-18 Thread Robert Cummings
Jacob Miller wrote: With leap year adjustment... strtotime(+1 year, timestamp); will return a unix timestamp. Nice, don't think I've ever used that function :) Cheers, Rob. -- .-. | Robert Cummings | :-`. | Webdeployer -

Re: [PHP] Date-format

2002-09-18 Thread Support @ Fourthrealm.com
Reformatting before an inserting/updating is one option, but how would we change the mySQL database to accept the other format? Peter At 04:18 PM 9/12/2002 +0800, Jacob Miller wrote: Why can't you just reformat it before inserting it into the db? $date = 31.12.2002; $parts

Re: [PHP] Date-format

2002-09-18 Thread Jacob Miller
From http://www.mysql.com/doc/en/Using_DATE.html quote The format of a DATE value is '-MM-DD'. According to ANSI SQL, no other format is allowed. You should use this format in UPDATE expressions and in the WHERE clause of SELECT statements. For example: mysql SELECT * FROM tbl_name WHERE

RE: [PHP] Date-format

2002-09-18 Thread Chuck Payne
I know everyone love to quote read the manual and forget that we[newbies] are only asking here because we need help...so here you go... You can do the following... DATE_FORMAT IS THE MySQL Command And let say you want to format your date as the following mm-dd-yy(US) or dd-mm-yy(the rest of

RE: [PHP] Date-format

2002-09-18 Thread Support @ Fourthrealm.com
Thanks everyone for the helpful answers. I agree that manuals are useful, but there are times when an example works better. I took all of this information, and some details from earlier posts about dates, and produced the following function to make it easy to format dates without have to go

[PHP] Date-format

2002-09-12 Thread Tommi Virtanen
Hi! I have web-form, which has field (10 chars), there I enter date (format dd.mm.). Then data saves to database (date-field type is date). So everything works, but not fine. When I enter date in format ex. 31.12.2002 and save form, then I'll check what are in db (there are 2031-12-20).

Re: [PHP] Date-format

2002-09-12 Thread Jacob Miller
It looks to me like the database is interpreting your date incorrectly. Try changing the format you use to insert, -mm-dd - jacob At 15:11 09/12/2002, Tommi Virtanen wrote: Hi! I have web-form, which has field (10 chars), there I enter date (format dd.mm.). Then data saves to

Re: [PHP] Date-format

2002-09-12 Thread Tommi Virtanen
Well, insert format in wrong, but in Finland enter format is dd.mm., so I cannot use other insert format (it have to do other way). gustavus It looks to me like the database is interpreting your date incorrectly. Try changing the format you use to insert, -mm-dd -- PHP General

Re: [PHP] Date-format

2002-09-12 Thread Jacob Miller
Why can't you just reformat it before inserting it into the db? $date = 31.12.2002; $parts = split(\., $date); echo $parts[2].-.$parts[1].-.$parts[0]; - jacob At 16:13 09/12/2002, Tommi Virtanen wrote: Well, insert format in wrong, but in Finland enter format is

[PHP] date question

2002-09-09 Thread Meltem Demirkus
Hi, Is there any function which returns the day , month or year of a date ? thanks meltem -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date question

2002-09-09 Thread Rudolf Visagie
Hi Meltem, The PHP manual is at http://www.php.net/manual/en (mirror sites as well). -Original Message- From: Meltem Demirkus [mailto:[EMAIL PROTECTED]] Sent: Monday, September 09, 2002 1:30 PM To: [EMAIL PROTECTED] Subject: [PHP] date question Hi, Is there any function which

[PHP] date from mysql

2002-08-29 Thread Hendråwan Rinäldi
i want Y (year format) printed on my php script (looping), i already tried it but i got same Year format (ex 1978) in all row in my table my loop script is: $query = (select * from table); $result = mysql_query($query); while ($row = mysql_fetch_row($result)) $number =

RE: [PHP] Date conversion problems

2002-08-27 Thread Liam . Gibbs
mktime generally only works thru 2037. Why not create an array of the months, and index in: $months = array('Jan','Feb',); $enddate = explode(-, $datereuslt[0]); $finaldate = $months[$enddate-1] . -$enddate[1]; That's what I thought I might have to do. It's an alternative, but a

[PHP] Date conversion problems

2002-08-26 Thread Liam . Gibbs
Having a little trouble with converting dates. I have, in my database, a bunch of dates stored like this: -M. Month is obviously the number of the month (5), not the name (May). I want to convert the format to MMM, (ex: May, 2002), so I used the mktime function. Basically I extract the

Re: [PHP] Date conversion problems

2002-08-26 Thread Matt
From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 26, 2002 3:58 PM Subject: [PHP] Date conversion problems Having a little trouble with converting dates. I have, in my database, a bunch of dates stored like this: -M. Month is obviously the number of the month (5

Re: [PHP] Date conversion problems

2002-08-26 Thread Matt
From: Matt [EMAIL PROTECTED] To: [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Monday, August 26, 2002 5:42 PM Subject: Re: [PHP] Date conversion problems From: [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Monday, August 26, 2002 3:58 PM Subject: [PHP] Date conversion problems mktime

RE: [PHP] Date conversion problems

2002-08-26 Thread David Freeman
I have, in my database, a bunch of dates stored like this: -M. Month is obviously the number of the month (5), not the name (May). I want to convert the format to MMM, (ex: May, 2002), Do the conversion in MySQL - it'll save you grief in the long run... SELECT

[PHP] date problem

2002-08-16 Thread Kae Verens
when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They are both one hour off from the server time. Any ideas of

Re: [PHP] date problem

2002-08-16 Thread Jason Wong
On Friday 16 August 2002 17:24, Kae Verens wrote: when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They are both

[PHP] date() doesn't return system date?

2002-08-15 Thread Kae Verens
when I type date in a console on my server, it returns a different time than that returned by date() or gmdate() - any idea why? -- Kae Verens http://www.contactjuggling.org/users/kverens/ http://www.contactjuggling.org/ (webmaster) -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] date() doesn't return system date?

2002-08-15 Thread adi
('H:m:s \m \i\s\ \m\o\n\t\h'); // 17:03:17 m is month $today = date(H:i:s); // 17:16:17 - Original Message - From: Kae Verens [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Thursday, August 15, 2002 5:31 PM Subject: [PHP] date() doesn't return system date

Re: [PHP] date() doesn't return system date?

2002-08-15 Thread Kae Verens
adi wrote: incorect sintax maybe I wasn't precise enough: when I place date(h:i a) in a page on my server, and view it in a browser, I am returned: 02:51 pm. According to the server itself, though (logged in through ssh), using date, it is 3:51. gmdate(h:i a) returns the same 2:51 time. They

[PHP] Date Stuff...

2002-08-02 Thread Brian McGarvie
Given a date how would you work out number of months elapsed between DateInPast and DateNow? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] Date Stuff...

2002-08-02 Thread Stas Maximov
(YearsDifference*12)+FullMonthsDifference :) Regards, Stas. - Original Message - From: Brian McGarvie [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, August 02, 2002 1:50 PM Subject: [PHP] Date Stuff... Given a date how would you work out number of months elapsed between

Re: [PHP] Date Stuff...

2002-08-02 Thread Chris Boget
Given a date how would you work out number of months elapsed between DateInPast and DateNow? ( $monthTo - $monthFrom ) + (( $yearTo - $yearFrom ) * 12 ) I believe that's the correct equation for figuring out the number of months. Chris -- PHP General Mailing List

[PHP] Date() Problem

2002-07-27 Thread Tony Harrison
Hi, im making a tab/lyric portal, and for viewing tabs i want to display the time the lyric/tab was submitted. So I retrive it from a MySQL database (as a timestamp) and format it using the date function. The problem is, that the date: 19-01-2038 04:14:07 is allways returned, even though in the

[PHP] date

2002-07-24 Thread Alexander Ross
I have a column in one of my mysql tables which holds the date time that the record was inserted. When I run a query later on I want to display the date, but if the date is today or yesterday I want to display today or yesterday instead .. how do i compare to stored date with todays date?

[PHP] Date () Help please

2002-07-15 Thread Attila
Hello all, I am very new to PHP and I have added some minor PHP to my website. I would like to make a PHP calander to keep track of things going on. Could someone tell me how I can get the first day of every month. For Example: 01 Jul 2002 was a Monday. 01 Mar 2002 will be a Thursday I

Re: [PHP] Date () Help please

2002-07-15 Thread Richard Baskett
[EMAIL PROTECTED] Date: Mon, 15 Jul 2002 16:44:39 -0600 To: [EMAIL PROTECTED] Subject: [PHP] Date () Help please Hello all, I am very new to PHP and I have added some minor PHP to my website. I would like to make a PHP calander to keep track of things going on. Could someone tell me how I

Re: [PHP] Date () Help please

2002-07-15 Thread Attila
bs 3:5-6 From: Attila [EMAIL PROTECTED] Date: Mon, 15 Jul 2002 16:44:39 -0600 To: [EMAIL PROTECTED] Subject: [PHP] Date () Help please Hello all, I am very new to PHP and I have added some minor PHP to my website. I would like to make a PHP calander to keep track of things going o

Re: [PHP] Date () Help please

2002-07-15 Thread Attila
rd with all your heart, And lean not on your own understanding; In all your ways acknowledge Him, And he shall direct your paths. - Proverbs 3:5-6 From: Attila [EMAIL PROTECTED] Date: Mon, 15 Jul 2002 16:44:39 -0600 To: [EMAIL PROTECTED] Subject: [PHP] Date () Help please H

RE: [PHP] Date () Help please

2002-07-15 Thread John Holmes
: [PHP] Date () Help please OK thought I should share in case any needs it but got it to work. Here is what it looks like and thanks to Richard Baskett for the help. $yr= date (Y); $mnth = date (F); $dy= 1; $string = $dy $mnth $yr; $today = date(w,strtotime($string)); Thanks for the help

[PHP] Date formatting

2002-07-10 Thread Rw
Had trouble getting this posed at the newsgroup - will try on the maillist here: I have a date field passed in a form like this: 01-02-2003 Is there a handy function to convert that to other ways of expressing the date such as: 01/02/03 OR 2003-01-02 I know the syntax of the date

RE: [PHP] Date formatting

2002-07-10 Thread Dan Vande More
:25 AM To: [EMAIL PROTECTED] Subject: [PHP] Date formatting Had trouble getting this posed at the newsgroup - will try on the maillist here: I have a date field passed in a form like this: 01-02-2003 Is there a handy function to convert that to other ways of expressing the date such as: 01/02

Re: [PHP] Date formatting

2002-07-10 Thread Analysis Solutions
On Wed, Jul 10, 2002 at 12:25:08PM -0500, Rw wrote: 01-02-2003 Is there a handy function to convert that to other ways of expressing the date such as: 01/02/03 $temp = preg_replace('/^(\d{2})-(\d{2})-(\d{2})(\d{2})$/', '\\1/\\2/\\4', $date); 2003-01-02 $temp =

RE: [PHP] Date Comparsion

2002-06-20 Thread Lazor, Ed
Check out the date() and mktime() functions. -Original Message- Now i want to compare the leave_from and leave_to date to find out the number of days between! What should i do or any function in php can provide this operation?

Re: [PHP] Date Comparsion

2002-06-20 Thread 1LT John W. Holmes
]; [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, June 20, 2002 12:53 PM Subject: RE: [PHP] Date Comparsion Check out the date() and mktime() functions. -Original Message- Now i want to compare the leave_from and leave_to date to find out the number of days between! What

[PHP] Date Comparsion

2002-06-18 Thread Jack
Dear all I had a form which let user to input the leave_from and leave_to date into, the format of the date that user input is -mm-dd. Now i want to compare the leave_from and leave_to date to find out the number of days between! What should i do or any function in php can provide this

<    3   4   5   6   7   8   9   10   11   >