Re: [PHP] date math question

2003-03-27 Thread Charles Kline
Caught that :) Thanks for the tip... worked just perfect (after I fixed typo) On Friday, March 28, 2003, at 12:57 AM, Foong wrote: sorry typo error should be: date('Y') Foong Foong [EMAIL PROTECTED] wrote in message news:[EMAIL PROTECTED] hi, $start = mktime ( 0, 0, 0, 1, 1, date['Y']); //

[PHP] Date Diff

2003-03-22 Thread Adam -
Greetings all, A while ago I was using asp and when I started using php the harder thing to learn was Dealing with dates. There isn't a datediff function like asp.. Instead you have timestamps. Powerful it may be but a little hard to learn about and use. Other wise I find php to be very

Re: [PHP] Date Diff

2003-03-22 Thread Jason Sheets
Hello Adam, Since timestamps are in seconds you just subtract them and then use date to convert it to a more human readable format. ?php $yesterday = time() - 86400; print date('m/d/y', $yesterday); ? You could also use the strtotime function to convert a string to a timestamp. PHP

[PHP] date problem

2003-03-19 Thread shaun
hi, using date(dS); how can i can increase the days so that it shows 19th 20th 21st I have tried while ($i 2){ $day++; echo' td'.$day.'/td'; $i++; } but i get: 19th 19ti 19tj thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

[PHP] date question

2003-03-19 Thread Charles Kline
Hi all, I have a form where users will be adding publication dates for uploaded files. I want to store the date in mySQL as date('U') format. If the date is entered as mm/dd/ - will the date function know this or is there some way of 'telling' php how the date to be converted is

Re: [PHP] date question

2003-03-19 Thread Kevin Stone
- Original Message - From: Charles Kline [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Wednesday, March 19, 2003 2:17 PM Subject: [PHP] date question Hi all, I have a form where users will be adding publication dates for uploaded files. I want to store the date in mySQL as date('U

[PHP] Date Conversion

2003-03-19 Thread shaun
Hi, when retrieving a date from MySQL in n/MM/DD, how can I present this to the user of a site in readable format i.e. 19th March 2003? Thanks for your help -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Date Conversion

2003-03-19 Thread John W. Holmes
when retrieving a date from MySQL in n/MM/DD, how can I present this to the user of a site in readable format i.e. 19th March 2003? SELECT DATE_FORMAT(column,' ... ') AS f_date FROM table WHERE ... Look up DATE_FORMAT in the MySQL manual, Chapter 6. It works almost the same as the PHP

[PHP] date

2003-03-14 Thread Diana Castillo
If I have a date in this format :19-MAR-03 how do I get the next date (the date plus 1)? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date

2003-03-14 Thread John W. Holmes
If I have a date in this format :19-MAR-03 how do I get the next date (the date plus 1)? echo strtoupper(date('d-M-y',strtotime($date +1 day))); But why do you have it in that format to begin with? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy

[PHP] date check

2003-03-12 Thread Fredrik
Hi I want to check if $var 14 days or $var 14 days ($var = $date2 - $date1) $date1 = 2003-01-16; $date2 = 2003-03-16; How can i check this? Are there any functions for this or do i have to make one? -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] date check

2003-03-12 Thread Niklas Lampén
$FourteenDays = 86400 * 14; $var = $FourteenDays - (strtotime($date2) - strtotime($date1)); Now if $var is 0, 14 days has not passed. Niklas -Original Message- From: Fredrik [mailto:[EMAIL PROTECTED] Sent: 12. maaliskuuta 2003 12:06 To: [EMAIL PROTECTED] Subject: [PHP] date check

[PHP] Date Question.

2003-03-05 Thread Sebastian
I have a date field in mysql in this format: Y-m-d H:i:s I would like to echo Today if the date is today, can someone offer some help? Thanks. warm regards, Sebastian - [BBR] Gaming Clan http://www.broadbandreports.com

RE: [PHP] Date Question.

2003-03-05 Thread Don Read
On 05-Mar-2003 Sebastian wrote: I have a date field in mysql in this format: Y-m-d H:i:s I would like to echo Today if the date is today, can someone offer some help? Thanks. SELECT IF(TO_DAYS(datefld)=TO_DAYS(current_date),'Today',LEFT(datefld,10)) as datefld, ... Regards, -- Don Read

[PHP] date range assistance needed

2003-03-03 Thread charles kline
Here is my current query: $qAnnouncement = 'SELECT id,headline FROM tbl_funding WHERE 1 AND ((UNIX_TIMESTAMP (datestamp) = ' . strtotime($attributes[startdate]) . ') AND (UNIX_TIMESTAMP (datestamp) = ' . strtotime($attributes[startdate]) . ')) LIMIT 0, 30'; Where datestamp is set in MySQL

RE: [PHP] date range assistance needed

2003-03-03 Thread John W. Holmes
today. http://www.phparch.com/ -Original Message- From: charles kline [mailto:[EMAIL PROTECTED] Sent: Monday, March 03, 2003 6:22 PM To: [EMAIL PROTECTED] Subject: [PHP] date range assistance needed Here is my current query: $qAnnouncement = 'SELECT id,headline FROM

[PHP] Date question

2003-03-01 Thread Sebastian
Greetings all. I have used strtotime() function in the past, and done this: if($time = strtotime('24 hours ago')) { $new = new!; } with it being in UNIX time stamp .. But now I have a different client where the time stamp in mysql is formatted like: 2002-08-29 10:53:09 what function would I

RE: [PHP] Date question

2003-03-01 Thread John W. Holmes
I have used strtotime() function in the past, and done this: if($time = strtotime('24 hours ago')) { $new = new!; } with it being in UNIX time stamp .. But now I have a different client where the time stamp in mysql is formatted like: 2002-08-29 10:53:09 what function would I use in

Re: [PHP] Date question

2003-03-01 Thread Sebastian
] To: 'Sebastian' [EMAIL PROTECTED]; 'php list' [EMAIL PROTECTED] Sent: Sunday, March 02, 2003 12:40 AM Subject: RE: [PHP] Date question | | SELECT column - INTERVAL 24 HOUR FROM your_table WHERE ... | | ---John W. Holmes... - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Sebastian

Re: [PHP] Date question

2003-03-01 Thread Tom Rogers
Hi, Sunday, March 2, 2003, 3:39:37 PM, you wrote: S Greetings all. S I have used strtotime() function in the past, and done this: if($time = strtotime('24 hours ago')) { S $new = new!; S } S with it being in UNIX time stamp .. But now I have a different client where S the time stamp in mysql

RE: [PHP] date, first of next month?

2003-02-27 Thread Jon Haworth
Hi Bryan, $t = mktime(0,0,0,date('m')+1,1,date('Y')); Gives you timestamp of first day, next month. Format accordingly with date(). is there such a say to now get the date of the first weekday after that date? You can brute force it: // grab the timestamp $t =

[PHP] date problem

2003-02-27 Thread Alexander Tsonev
Hello, I would ask you a question about date type if I have a variable from date type ($newdate) such as 2003-02-17 how can I separate $newdate into 3 different variables? I want to create such variables: $day=17 $month=2 $year=2003 I searched a lot, but I didn't find how to do this. I'll be very

Re: [PHP] date problem

2003-02-27 Thread Lowell Allen
From: Alexander Tsonev [EMAIL PROTECTED] Hello, I would ask you a question about date type if I have a variable from date type ($newdate) such as 2003-02-17 how can I separate $newdate into 3 different variables? I want to create such variables: $day=17 $month=2 $year=2003 I searched a

[PHP] date, first of next month?

2003-02-26 Thread Bryan Koschmann - GKT
Hello, Does anyone know a way to do this easily? I have a script that pretty much says this is due on the first of next month but I would like it to actually use the correct date. Thanks, Bryan -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

Re: [PHP] date, first of next month?

2003-02-26 Thread 1LT John W. Holmes
Does anyone know a way to do this easily? I have a script that pretty much says this is due on the first of next month but I would like it to actually use the correct date. You would think strtotime(first of next month) would work, but it doesn't. This does: $t =

Re: [PHP] date, first of next month?

2003-02-26 Thread Chris Shiflett
--- Bryan Koschmann - GKT [EMAIL PROTECTED] wrote: Does anyone know a way to do this easily? I have a script that pretty much says this is due on the first of next month but I would like it to actually use the correct date. Well, you need: 1. The day of the month, which is always going to be

Re: [PHP] date, first of next month?

2003-02-26 Thread Brent Baisley
Use the mktime function: mktime (0,0,0,(date(n,$date)+1),1,date(Y,$date)) Where the variable $date contains whatever is the starting date. The function handles a December date just fine also. On Wednesday, February 26, 2003, at 03:28 PM, Bryan Koschmann - GKT wrote: Hello, Does anyone know a

Re: [PHP] date, first of next month?

2003-02-26 Thread Bryan Koschmann - GKT
On Wed, 26 Feb 2003, 1LT John W. Holmes wrote: |You would think strtotime(first of next month) would work, but it doesn't. |This does: | |$t = mktime(0,0,0,date('m')+1,1,date('Y')); | |Gives you timestamp of first day, next month. Format accordingly with |date(). Thats great, worked perfectly!

[PHP] Date/Time Logic

2003-02-19 Thread Pushpinder Singh Garcha
Hello Everyone, My php/mysql application needs to keep track of the first time that a User logs on to the site. Afterwards the User should be allowed either 3 days / 3 months/1 year of access to the site. Once the stipulated time period is over the system should invalidate the login of the

Re: [PHP] Date/Time Logic

2003-02-19 Thread Brent Baisley
It sounds like you're asking for triggers, which are available yet. But you could setup a cron job to run every night to update the database. It would be no different than doing a nightly dump for backup. You could even have it email you the accounts that were closed and those that will be

Re: [PHP] Date/Time Logic

2003-02-19 Thread Justin French
I assume you talking about a logged in, validated user -- because there's no way to prevent a user from deleting their cookies, or changing their IP, or using a different computer to access the site. My only suggestion is that you create a user/pass login system, maintain it with sessions, and

[PHP] date calculation

2003-02-16 Thread qt
Dear Sirs, How can I add or subtract two date easily. Is therea any lib or function about this. I can not find any easy way in the manual Best Regards -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date calculation

2003-02-16 Thread Kevin Waterson
This one time, at band camp, qt [EMAIL PROTECTED] wrote: Dear Sirs, How can I add or subtract two date easily. Is therea any lib or function about this. I can not find any easy way in the manual if the dates are timestamps, simply $new = $timestamp2 - $timestamp1; cheers Kevin --

Re: [PHP] date calculation

2003-02-16 Thread qt
Dear Kevin, I used timestamp allready as following; $today = strtotime (1 february 2003); $enddate = strtotime (1 march 2003); $diff = $enddate - $today; But result comes as 2419200 How can I convert that numbers to days Best Regards Kevin Waterson [EMAIL PROTECTED] wrote in message

Re: [PHP] date calculation

2003-02-16 Thread Stephen Willcock
Try: $today = strtotime (1 february 2003); $enddate = strtotime (2 february 2003); $diff = $enddate - $today; Should give you a clue! SW Qt [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]... Dear Kevin, I used timestamp allready as following; $today =

Re: [PHP] date calculation

2003-02-16 Thread qt
Dear Stephen, Good clue!! Is it working allways without problem such as 29 feb? And one more hel how can I write 1 2 2003 instead of 1 february 2003 I wrote but directly but doesn' t work thanks Stephen Willcock [EMAIL PROTECTED] wrote in message [EMAIL PROTECTED]">news:[EMAIL PROTECTED]...

Re: [PHP] date calculation

2003-02-16 Thread Stephen Willcock
Yes, will be OK with all dates (though 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.) The function you want for numeric dates is: int mktime ( int hour, int minute, int second, int month, int day, int year) so, in your example

[PHP] Date formating

2003-02-15 Thread Dhaval Desai
Hi, I have a string in this format: 2003-02-15 13:19:02 I want to display it in a more readable format like Staurday, 11 Februardy, 2003, 13:19:02. How can I achieve that. I tried date() function but could not get what I wanted. -Dhaval

Re: [PHP] Date formating

2003-02-15 Thread Jason Wong
On Saturday 15 February 2003 16:56, Dhaval Desai wrote: Hi, I have a string in this format: 2003-02-15 13:19:02 I want to display it in a more readable format like Staurday, 11 Februardy, 2003, 13:19:02. How can I achieve that. I tried date() function but could not get what I wanted.

Re: [PHP] Date formating

2003-02-15 Thread Justin French
? echo date('the format you want', strtotime('2003-02-15 13:19:02')); ? In this case 'the format you want' is 'l, d F, Y. H:i:s', but you should be able to look it up in the manual for yourself. php.net/date strtotime('2003-02-15 13:19:02') SHOULD work, converting the string to a unix time

RE: [PHP] Date formating

2003-02-15 Thread David Freeman
I have a string in this format: 2003-02-15 13:19:02 I want to display it in a more readable format like Staurday, 11 Februardy, 2003, 13:19:02. How can I achieve that. I tried date() function but could not get what I wanted. The date format above is a standard mysql date/time

[PHP] Date check

2003-02-11 Thread Fredrik
Hi I have to dates that i want to check who is biggest. This does not work: if( $date1 $date2){ How can i check them? Svein Olai -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] Date check

2003-02-11 Thread Jon Haworth
Hi Fredik, I have to dates that i want to check who is biggest. This does not work: if( $date1 $date2){ How can i check them? Presumably they're in SQL format, or something similar? The easiest way is to convert them to unix timestamps (look into the date() and mktime()

[PHP] Date Difference Errors

2003-02-06 Thread Rob Quenzer
I have a function that I use to return the number of days between two dates. It worked fine on my Mandrake 7.0 server running PHP 4. I am trying to run it on a RedHat 8.0 box with the same version of PHP. On Mandrake, strtotime() and mktime() returned a negative number for dates prior to

Re: [PHP] Date Difference Errors

2003-02-06 Thread Jason Wong
On Thursday 06 February 2003 23:13, Rob Quenzer wrote: I have a function that I use to return the number of days between two dates. It worked fine on my Mandrake 7.0 server running PHP 4. I am trying to run it on a RedHat 8.0 box with the same version of PHP. On Mandrake, strtotime() and

[PHP] Date format from file

2003-02-05 Thread ed
Is it possible to read a string from a text file (i.e. 0502031130) and be able to use that in a date function such as: $date = date(dmyHi, strtotime('+28 days)); How would I use that string as the date in the above code? TIA, Ed -- PHP General Mailing List (http://www.php.net/) To

Re: [PHP] Date format from file

2003-02-05 Thread Tom Rogers
Hi, Thursday, February 6, 2003, 2:41:42 AM, you wrote: ehhc Is it possible to read a string from a text file (i.e. ehhc 0502031130) and be able to use that in a date function such as: ehhc $date = date(dmyHi, strtotime('+28 days)); ehhc How would I use that string as the date in the above

RE: [PHP] Date format from file

2003-02-05 Thread John W. Holmes
Is it possible to read a string from a text file (i.e. 0502031130) and be able to use that in a date function such as: $date = date(dmyHi, strtotime('+28 days)); How would I use that string as the date in the above code? What database are you using? You can probably do all of this in

RE: [PHP] Date format from file

2003-02-05 Thread ed
I'm not using this for any database related function. What I'm trying to do is come up with a method for scheduling processes needed for our company that are run through command line php scripts. I'll be using cron or to run a command that will check the date within the file and see if the

RE: [PHP] Date format from file

2003-02-05 Thread John W. Holmes
I'm not using this for any database related function. What I'm trying to do is come up with a method for scheduling processes needed for our company that are run through command line php scripts. I'll be using cron or to run a command that will check the date within the file and see if the

RE: [PHP] Date format from file (END)

2003-02-05 Thread ed
I don't know of another program. As long as you write a unix timestamp or some date format that can be parsed by strtotime(), then you can do it this way. Use fopen()/fread() to get the last time saved in the file. If you're using unix timestamps, just see if the current time is greater

[PHP] Date and time problem

2003-02-02 Thread Denis L. Menezes
Hello friends. The follwing code displays the date on my webpage : echo date (l dS of F Y h:i:s A); However, I need to add 12 hrs to this date befor displaying on the webpage. Can someone please help me to modify the above code? Thanks Denis

Re: [PHP] Date and time problem

2003-02-02 Thread Tom Rogers
Hi, Monday, February 3, 2003, 11:10:36 AM, you wrote: DLM Hello friends. DLM The follwing code displays the date on my webpage : DLM echo date (l dS of F Y h:i:s A); DLM However, I need to add 12 hrs to this date befor displaying on the webpage. Can someone please help me to modify the above

Re: [PHP] Date and time problem

2003-02-02 Thread Larry E. Ullman
echo date (l dS of F Y h:i:s A); However, I need to add 12 hrs to this date befor displaying on the webpage. Can someone please help me to modify the above code? $t = time() + (12 * 60 * 60); echo date (l dS of F Y h:i:s A, $t); Larry -- PHP General Mailing List (http://www.php.net/) To

[PHP] Date Comparison

2003-01-11 Thread Dhaval Desai
Hello ppl, Well, I want to compate date is php, could anybody tell me which is the best way to do so? I have tried various ways but nothing seems consistent. I tried for example: if(2003-1-15 2003-1-11) { echo true; } which doesn't work in some cases... Thank you! Best Regards, Dhaval

Re: [PHP] Date Comparison

2003-01-11 Thread Matt
- Original Message - From: Dhaval Desai [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Saturday, January 11, 2003 8:38 AM Subject: [PHP] Date Comparison Well, I want to compate date is php, could anybody tell me which is the best way to do so? Look at PHPs date functions http

Re: [PHP] Date Comparison

2003-01-11 Thread Jason Wong
On Saturday 11 January 2003 21:38, Dhaval Desai wrote: Hello ppl, Well, I want to compate date is php, could anybody tell me which is the best way to do so? I have tried various ways but nothing seems consistent. I tried for example: if(2003-1-15 2003-1-11) { echo true; } which

[PHP] Date problem

2002-12-31 Thread Denis L. Menezes
Hello friends. Happy New Year to you all. Our school holds many seminars of varying durations and dates. I want to make a page which says What's on today which will show all the seminars that are on today. However the entry in the database will show two fields Commencing Date and Ending date.

Re: [PHP] Date problem

2002-12-31 Thread Rick Widmer
At 05:23 PM 12/31/02 +0800, Denis L. Menezes wrote: Hello friends. Is there a routine in PHP I can use to find if today's date fits between the commencing date and the ending date? SELECT * FROM Table WHERE NOW() = StartDate AND NOW() = EndDate Rick -- PHP General Mailing List

RE: [PHP] Date problem

2002-12-31 Thread John W. Holmes
Our school holds many seminars of varying durations and dates. I want to make a page which says What's on today which will show all the seminars that are on today. However the entry in the database will show two fields Commencing Date and Ending date. Is there a routine in PHP I can use to

[PHP] Date fields

2002-12-28 Thread Peter Goggin
I have a form with several date fields. I want to be able to set these by selecting from a calendar display. Does anyone know of any php function or code which would let me do this? Regards Peter Goggin -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit:

RE: [PHP] Date fields

2002-12-28 Thread David Freeman
G'day Peter I have a form with several date fields. I want to be able to set these by selecting from a calendar display. Does anyone know of any php function or code which would let me do this? If you mean having some sort of pop-up calendar display that the user can select a date from

[PHP] Date Subtraction

2002-12-23 Thread Christopher J. Crane
I have two periods in time from a Cisco router that I would like to find the difference in seconds. I am not sure the best way to do this since it is not a date, but rather an amount of time since last reset. Here is the numbers 181 days, 7:11:06.66 //stands for 181 days, 7 hours, 11 minutes,

Re: [PHP] Date Subtraction

2002-12-23 Thread Marco Tabini
I don't think you can use strtotime in that case. However, assuming that your data is properly formatted every time, you can use a simple function like this (I'm doing it from memory, so it might not actually work): ?php function conv_time ($s) { preg_match (/^([0-9]*) days,

Re: [PHP] Date Subtraction

2002-12-23 Thread Justin French
okay, this is just me thinking out loud... none of this is tested... ? function something($time) { $time = substr($time, 0, -3); list($days,$theRest) = explode(' days, ', $time); list($h,$m,$s) = explode(':', $theRest); $days = $days * 86400; $h = $h * 360; $m = $m *

[PHP] date part

2002-12-19 Thread Diana Castillo
How can I get a string containing the month part of a date the user types in? e.g. if they type in 06/07/200 I want to get 06 thanks, diana -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

RE: [PHP] date part[Scanned]

2002-12-19 Thread Michael Egan
with drop down boxes for year, month and day. Michael Egan -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED]] Sent: 19 December 2002 14:05 To: [EMAIL PROTECTED] Subject: [PHP] date part[Scanned] How can I get a string containing the month part of a date the user types

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
Castillo [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: [PHP] date part How can I get a string containing the month part of a date the user types in? e.g. if they type in 06/07/200 I want to get 06 thanks, diana -- PHP General Mailing List (http

RE: [PHP] date part

2002-12-19 Thread Adam Voigt
any part needed. Eddie -Original Message- From: Diana Castillo [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 9:05 AM To: [EMAIL PROTECTED] Subject: [PHP] date part How can I

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
, December 19, 2002 9:38 AM To: Edward Peloke Cc: Diana Castillo; [EMAIL PROTECTED] Subject: RE: [PHP] date part I just tried that script, for me under Linux with Mozilla and Netscape, I had to try 5 times before I could move the mouse from the button to the menu fast enough, every other time

RE: [PHP] date part

2002-12-19 Thread Edward Peloke
Sorry ADAM, didn't mean to call you Allan, I apologize! -Original Message- From: Edward Peloke [mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] date part Thanks Allan! That is good to know. It is just a script that I

RE: [PHP] date part

2002-12-19 Thread Adam Voigt
[mailto:[EMAIL PROTECTED]] Sent: Thursday, December 19, 2002 10:11 AM To: [EMAIL PROTECTED] Subject: RE: [PHP] date part Thanks Allan! That is good to know. It is just a script that I downloaded from the internet. Not sure how to make it work

RE: [PHP] date part

2002-12-19 Thread John W. Holmes
How can I get a string containing the month part of a date the user types in? e.g. if they type in 06/07/200 I want to get 06 If you know that's the format they're going to use, the you can just use substr() to grab the first two characters. ---John W. Holmes... PHP Architect - A monthly

Re: [PHP] date part

2002-12-19 Thread Rick Emery
Following on to the L T: $ar = explode(/,$thestring); thenL $ar[0] = 06 $ar[1] = 07 $ar[2] = 200 - Original Message - From: John W. Holmes [EMAIL PROTECTED] To: 'Diana Castillo' [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Thursday, December 19, 2002 11:56 AM Subject: RE: [PHP] date part

[PHP] Date Formatting

2002-12-13 Thread Clint Tredway
How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint

Re: [PHP] Date Formatting

2002-12-13 Thread Support @ Fourthrealm.com
Use this: function makedate($format, $indate) { $temp = explode(-, $indate); $fulldate = mktime(0, 0, 0, $temp[1], $temp[2], $temp[0]); $temp = date($format, $fulldate); return ($temp); } and call it with

Re: [PHP] Date Formatting

2002-12-13 Thread Joseph W. Goff
: Friday, December 13, 2002 11:55 AM Subject: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint -- PHP General

Re: [PHP] Date Formatting

2002-12-13 Thread 1LT John W. Holmes
[EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 13, 2002 12:55 PM Subject: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot

Re: [PHP] Date Formatting

2002-12-13 Thread Rick Emery
: [PHP] Date Formatting How can I format a date coming out of a MySQL? I know how to format today's date but not a date coming out of MySQL. I have looked through the manual, but I must be blind because I cannot figure it out. Thanks, Clint -- PHP General Mailing List (http://www.php.net

Re: [PHP] Date Formatting

2002-12-13 Thread Clint Tredway
thanks for all the replies. I was able to use the date_format() from MySQL. Clint - Original Message - From: Rick Emery [EMAIL PROTECTED] To: Clint Tredway [EMAIL PROTECTED]; [EMAIL PROTECTED] Sent: Friday, December 13, 2002 1:13 PM Subject: Re: [PHP] Date Formatting MYSQL will do all

RE: [PHP] date() on two diff. servers

2002-12-11 Thread Ford, Mike [LSS]
-Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: 10 December 2002 19:52 =as a Windows user I struggle to cope with some of these UNIX concepts, so I hit Google - with no joy, and ripped through the SuSE manuals (I'm a closet Linux user - will become one, just

Re: [PHP] date() on two diff. servers

2002-12-11 Thread DL Neil
Mike, No complaints about explanations in PHP manual - I often say that it IS a cut-above the average. However it does NOT explain the underlying concepts of timestamps, (quite rightly) expecting that we pick up such from other/more appropriate sources. Hence my comments are refering to such

Re: [PHP] date() on two diff. servers

2002-12-10 Thread DL Neil
=now let's take a look at the UNIX Epoch. Various 'quotations' have surfaced in this email, and I don't recall that it is well discussed within the PHP manual (it being a UNIX definition after all...). The epoch 'began' 1Jan1970, sure enough (exactly as quoted). HOWEVER it is defined

Re: [PHP] date() on two diff. servers

2002-12-09 Thread DL Neil
Justin, Jumping in late... Daylight Savings Time? John, I think Daylight Saving Time creates a difference of 1 hour and not 1 day :) True... but I checked it anyway -- by adding just one and two hours to the stamp... which made no difference... but when I added 86400 to the stamp, it all

Re: [PHP] date() on two diff. servers

2002-12-09 Thread Justin French
Thanks heaps -- very reassuring :) Justin on 09/12/02 9:49 PM, DL Neil ([EMAIL PROTECTED]) wrote: Justin, Jumping in late... Daylight Savings Time? John, I think Daylight Saving Time creates a difference of 1 hour and not 1 day :) True... but I checked it anyway -- by adding just one

RE: [PHP] date() on two diff. servers

2002-12-09 Thread Ford, Mike [LSS]
-Original Message- From: DL Neil [mailto:[EMAIL PROTECTED]] Sent: 09 December 2002 10:50 [snip...] =now let's take a look at the UNIX Epoch. Various 'quotations' have surfaced in this email, and I don't recall that it is well discussed within the PHP manual (it being a UNIX

Re: [PHP] date() on two diff. servers

2002-12-09 Thread @ Edwin
Hello gurus, Ford, Mike [LSS] [EMAIL PROTECTED] wrote: [snip] To amplify on this: ... [/snip] Interesting comments! ...not sure if I understood everything though :( Anyway, for Justin's original problem, I think it'll be solve by simply doing two things: 1. Add GMT to the end of the string

[PHP] date() on two diff. servers

2002-12-08 Thread Justin French
Hi, I'm running the following code on two servers: ? $stamp = 1039525200; echo date('D, d M Y',$stamp); ? On my local development box (Free BSD, PHP 4.1.1, on AUSTRALIAN time), the above echo's Wed, 11 Dec 2002 (I consider this to be the correct date. However on the live server (Red Hat, PHP

RE: [PHP] date() on two diff. servers

2002-12-08 Thread John W. Holmes
Daylight Savings Time? ---John W. Holmes... PHP Architect - A monthly magazine for PHP Professionals. Get your copy today. http://www.phparch.com/ -Original Message- From: Justin French [mailto:[EMAIL PROTECTED]] Sent: Sunday, December 08, 2002 8:59 PM To: php Subject: [PHP] date

Re: [PHP] date() on two diff. servers

2002-12-08 Thread @ Edwin
Hello, John W. Holmes [EMAIL PROTECTED] wrote: Daylight Savings Time? John, I think Daylight Saving Time creates a difference of 1 hour and not 1 day :) Anyway, I live in a place where we don't practice this so I could be wrong... ...[snip]... Now, what could be causing this problem?

Re: [PHP] date() on two diff. servers

2002-12-08 Thread @ Edwin
But, then again, it could be just because the other server's time is really late... (caused by old motherboard batteries, etc.) - E @ Edwin [EMAIL PROTECTED] wrote: Hello, John W. Holmes [EMAIL PROTECTED] wrote: Daylight Savings Time? John, I think Daylight Saving Time creates a

Re: [PHP] date() on two diff. servers

2002-12-08 Thread Justin French
on 09/12/02 1:30 PM, @ Edwin ([EMAIL PROTECTED]) wrote: Daylight Savings Time? John, I think Daylight Saving Time creates a difference of 1 hour and not 1 day :) True... but I checked it anyway -- by adding just one and two hours to the stamp... which made no difference... but when I added

Re: [PHP] date() on two diff. servers

2002-12-08 Thread Tom Rogers
Hi, Monday, December 9, 2002, 11:59:07 AM, you wrote: JF Hi, JF I'm running the following code on two servers: JF ? JF $stamp = 1039525200; JF echo date('D, d M Y',$stamp); ? JF On my local development box (Free BSD, PHP 4.1.1, on AUSTRALIAN time), the JF above echo's Wed, 11 Dec 2002 (I

Re: [PHP] date() on two diff. servers

2002-12-08 Thread @ Edwin
Justin French [EMAIL PROTECTED] wrote: [snip] Perhaps strtotime() is NOT running off GMT, [/snip] Bingo! ...or, Bull's eye!, whatever :) Anyway, I think this is implied in the manual. http://www.php.net/manual/en/function.strtotime.php Also, check User Contributed Notes: piran at

Re: [PHP] date() on two diff. servers

2002-12-08 Thread Justin French
on 09/12/02 3:06 PM, @ Edwin ([EMAIL PROTECTED]) wrote: [snip] Perhaps strtotime() is NOT running off GMT, [/snip] Bingo! *GULP*... so, what we're saying is, that if I intend to pass data around on multiple servers (in different timezones) using a unix timestamp for dates (which i prefer

Re: [PHP] date() on two diff. servers

2002-12-08 Thread @ Edwin
Justin French [EMAIL PROTECTED] wrote: on 09/12/02 3:06 PM, @ Edwin ([EMAIL PROTECTED]) wrote: [snip] Perhaps strtotime() is NOT running off GMT, [/snip] Bingo! *GULP*... so, what we're saying is, that if I intend to pass data around on multiple servers (in different timezones)

[PHP] Date again

2002-12-06 Thread Miguel Brás
Ok guys, having a problem here. I did my table with 6 fields, they are: id position name timein timeout date I have a form to insert the info on the fields, and at the date field, I have a drop down menu that returns me the next 7 days (the date in d/m/y), people will choose the date they

Re: [PHP] Date again

2002-12-06 Thread Stephen
- From: Miguel Brás [EMAIL PROTECTED] To: [EMAIL PROTECTED] Sent: Friday, December 06, 2002 10:39 PM Subject: [PHP] Date again Ok guys, having a problem here. I did my table with 6 fields, they are: id position name timein timeout date I have a form to insert the info on the fields

Re: [PHP] Date again

2002-12-06 Thread Jason Wong
On Saturday 07 December 2002 11:39, Miguel Brás wrote: Ok guys, having a problem here. I did my table with 6 fields, they are: id position name timein timeout date I have a form to insert the info on the fields, and at the date field, I have a drop down menu that returns me the next 7

Re: [PHP] date

2002-12-03 Thread Rick Widmer
Hi, please could someone tell me how i can return a month in text from an int ie getMonth(12) How about: $Months = array( , 'Jan', 'Feb', 'Mar', 'Apr', 'May', 'Jun', 'Jul', 'Aug', 'Sep', 'Oct', 'Nov', 'Dec' ); echo $Months[12]; // Dec Rick -- PHP General

<    2   3   4   5   6   7   8   9   10   11   >