Re: [PHP] Date function kill lots time !

2012-01-05 Thread xucheng
yes,it is set in php.ini . 2012/1/5 Adam Richardson > On Wed, Jan 4, 2012 at 11:07 PM, xucheng wrote: > >> hi all, >> I have a webapp which track visitors, and use xhprof for profiling my >> codes . >> After reading some reports produced by xhprof, i found that function >> Date() kills most

Re: [PHP] Date function kill lots time !

2012-01-04 Thread Adam Richardson
On Wed, Jan 4, 2012 at 11:07 PM, xucheng wrote: > hi all, > I have a webapp which track visitors, and use xhprof for profiling my > codes . > After reading some reports produced by xhprof, i found that function > Date() kills most time of my app ! > how can this happen ? Is this function ha

Re: [PHP] Date Function

2008-02-23 Thread Richard Heyes
$start_date = date("Y-m-d h:i:s", strtotime($date_format)); echo $start_date; ?> output is 2008-02-22 02:00:00 but not 2008-02-22 14:00:00 How can i get my output as 2008-02-22 14:00:00. Use H instead of h. And try the manual. -- Richard Heyes http://www.phpguru.org Free PHP and Javascript

Re: [PHP] Date Function

2008-02-22 Thread Zoltán Németh
2008. 02. 22, péntek keltezéssel 11.48-kor VamVan ezt írta: > Hi All, > > Greetings!! > > A small PHP Script for help > > $date_format = '02/22/2008 14:00:00'; > > $start_date = date("Y-m-d h:i:s", strtotime($date_format)); $start_date = date("Y-m-d H:i:s", strtotime($date_format)); RTFM:

Re: [PHP] Date Function ][Resolved]

2008-02-22 Thread VamVan
Thanks ALL who have replied On Fri, Feb 22, 2008 at 11:55 AM, Thiago Pojda <[EMAIL PROTECTED]> wrote: > > $start_date = date("Y-m-d H:i:s", strtotime($date_format)); echo > $start_date; ?> > > capital H should do it > > > -Mensagem original- > De: VamVan [mailto:[EMAIL PROTECTED] >

Re: [PHP] Date Function

2008-02-22 Thread Andrew Ballard
On Fri, Feb 22, 2008 at 2:48 PM, VamVan <[EMAIL PROTECTED]> wrote: > Hi All, > > Greetings!! > > A small PHP Script for help > >$date_format = '02/22/2008 14:00:00'; > > $start_date = date("Y-m-d h:i:s", strtotime($date_format)); > echo $start_date; > ?> > > output is 2008-02-22 02:00:00

RE: [PHP] date() function

2006-11-15 Thread Ivo F.A.C. Fokkema
On Tue, 14 Nov 2006 15:11:56 -0500, Brad Fuller wrote: > > > $prevminute = sprintf('%02s', date("i")-1); Or, $prevminute = str_pad(date("i")-1, 2, '0', STR_PAD_LEFT); It's a little more code - don't ask me about the speed :) Ivo -- PHP General Mailing List (http://www.php.net/) To unsubscr

RE: [PHP] date() function

2006-11-14 Thread Brad Fuller
$prevminute = sprintf('%02s', date("i")-1); > -Original Message- > From: Ashley M. Kirchner [mailto:[EMAIL PROTECTED] > Sent: Tuesday, November 14, 2006 1:17 PM > To: PHP General List > Subject: [PHP] date() function > > > I noticed that if I do something like this: > > $pre

Re: [PHP] Date Function Questions

2005-12-12 Thread Jesús Fernández
the date taken is the same as the local time of the webserver. So if it changes that maybe the server admin's are changing it? -- http://esu.proyectoanonimo.com http://www.proyectoanonimo.com

Re: [PHP] Date function and MySQL

2005-07-20 Thread kalinga
> > > Hi all. > > > > > > I have the week number (for example, this is the 29th week of the > > > year and it begins on 7/17/05). Does anyone know how to obtain the > > > first (and maybe the last) date of the week if you only know the week > > > number of the year? Would it be better for me to obt

Re: [PHP] Date function and MySQL

2005-07-20 Thread kalinga
this seems pretty interesting, i'm tring to write a code in php to get those two outputs, but bit confused in counting weeks. could somebody clear me.. "what is the first *date* of the first week of year 2005?" is it "saturday jan 1st 2005" (assuming first week starts from jan 1 of any year) or i

Re: [PHP] Date function and MySQL

2005-07-19 Thread Arno Coetzee
Philip Thompson wrote: Hi all. I have the week number (for example, this is the 29th week of the year and it begins on 7/17/05). Does anyone know how to obtain the first (and maybe the last) date of the week if you only know the week number of the year? Would it be better for me to obtain

Re: [PHP] date function

2004-09-19 Thread Jordi Canals
On Sun, 19 Sep 2004 14:29:54 +0300, Magdy <[EMAIL PROTECTED]> wrote: > my problem is with date( ) function which is display a GMT time which is different > from my zone with 3 hours,,,how can i correct this. The date() function, gets the system current date/time if you don't pass the second para

Re: [PHP] Date function

2004-03-05 Thread Richard Davey
Hello Jason, Friday, March 5, 2004, 1:51:57 PM, you wrote: JB> Hello, I am new to using the date function. I am in the need of a JB> script that changes an image on a web page on the first day of each JB> month and keeps the image there until the first day of the next month. JB> I have tried to

RE: [PHP] date() function doesn't seem to work right...

2003-12-02 Thread Wouter van Vliet
On maandag 1 december 2003 21:04 Curt Zirzow told the butterflies: > * Thus wrote Scott Fletcher ([EMAIL PROTECTED]): > > When I do this script, I didn't get a ":" and numbers in > > second. --snip-- date("Y-m-d H:i:s"); > > --snip-- > > > > works fine with phpversion() 4.2.2 > > Curt > -- >

Re: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Curt Zirzow
* Thus wrote Scott Fletcher ([EMAIL PROTECTED]): > When I do this script, I didn't get a ":" and numbers in second. > --snip-- > date("Y-m-d H:i:s"); > --snip-- > works fine with phpversion() 4.2.2 Curt -- If eval() is the answer, you're almost certainly asking the wrong question. -- Rasmus

Re: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Chris Shiflett
--- Scott Fletcher <[EMAIL PROTECTED]> wrote: > When I do this script, I didn't get a ":" and numbers in second. > --snip-- > date("Y-m-d H:i:s"); > --snip-- > > But when I do this script by adding a period to it, it worked okay. > --snip-- > date("Y-m-d H:i:s."); > --snip-- Either this is a bug

Re: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Scott Fletcher
Okay thanks... I'll do a workaround for now until PHP get upgraded in the near future. "Thijs Lensselink" <[EMAIL PROTECTED]> wrote in message news:[EMAIL PROTECTED] > Scott Fletcher wrote on maandag 1 december 2003 16:41: > > When I do this script, I didn't get a ":" and numbers in second. > : -

RE: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Thijs Lensselink
Scott Fletcher wrote on maandag 1 december 2003 16:41: When I do this script, I didn't get a ":" and numbers in second. : --snip-- : date("Y-m-d H:i:s"); : --snip-- : : But when I do this script by adding a period to it, it worked : okay. --snip-- : date("Y-m-d H:i:s."); : --snip-- : : Thank

RE: [PHP] date() function doesn't seem to work right...

2003-12-01 Thread Jay Blanchard
[snip] When I do this script, I didn't get a ":" and numbers in second. --snip-- date("Y-m-d H:i:s"); --snip-- [/snip] When I cut and paste your code (PHP v 4.3.n) it works OK -- PHP General Mailing List (http://www.php.net/) To unsubscribe, visit: http://www.php.net/unsub.php

Re: [PHP] date() function and timestamps

2003-07-04 Thread Jeff Harris
On Jul 3, 2003, "Garrick Linn" claimed that: |Hello all, | |I seem to be running into a problem where the date() function appears not |to differentiate properly between unix timestamps. | |For example, the code: | |"; |echo date("d-m-Y H:m:s", $seconds); |echo ""; | |$seconds = ($seconds - 60); |e

Re: [PHP] date() function and timestamps

2003-07-03 Thread Garrick Linn
Doh! Gracias. :-) At 11:58 PM 7/3/2003 +, Philip Olson wrote: :) You are using an m where you want an i. Regards, Philip On Thu, 3 Jul 2003, Garrick Linn wrote: > Hello all, > > I seem to be running into a problem where the date() function appears not > to differentiate properly between

Re: [PHP] date() function and timestamps

2003-07-03 Thread Philip Olson
:) You are using an m where you want an i. Regards, Philip On Thu, 3 Jul 2003, Garrick Linn wrote: > Hello all, > > I seem to be running into a problem where the date() function appears not > to differentiate properly between unix timestamps. > > For example, the code: > > > $seconds =

Re: [PHP] Date Function in Php

2002-05-15 Thread Miguel Cruz
On Wed, 15 May 2002, Vinod Palan wrote: > Do any one have date functions like that we have in asp 1) Dateadd() > 2) Datediff() > etc? You might be able to get what you need with strtotime, which is a marvelous thing. See: http://www.gnu.org/manual/tar-1.12/html_chapter/tar_7.html The rest of

Re: [PHP] Date function

2002-04-19 Thread Danny Shepherd
MySQL (I assume that's the database you're inserting into) requires dates to be sent in -MM-DD format. You appear to be sending a unix timestamp. Try: date("Y-m-d",time()) // Sends a MySQL style date. or even: $SQL = "INSERT INTO orders (Customer_Id, Order_Date) VALUES($CustID,NOW())"; //

Re: [PHP] date( ) - function

2002-02-05 Thread Mike Maltese
try date("H:i:s",time()). Mike - Original Message - From: "soma" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Tuesday, February 05, 2002 12:32 AM Subject: [PHP] date( ) - function > i have one question > > linux system's time is right but php's date () function time is wrong.

Re: [PHP] Date function

2002-01-28 Thread sundogcurt
Is this date stored in mysql by anychance? [EMAIL PROTECTED] wrote: >Hi All, > >Is there any function in PHP4.X or in Oracle8i to calculate number of >Business days ( excluding Saturday and Sunday) between two given dates? > >Thanks in advance. >Sridhar. > >-Original Message- >From: qar

Re: [PHP] Date function

2001-08-15 Thread Don Read
On 16-Aug-2001 David Robley wrote: > On Thu, 16 Aug 2001 00:38, Mike Mike wrote: >> Hello, >> I'm pulling a date out of MySQL as 2001-10-18. >> How do I make it print October 18 in php? >> Thanks much >> --Mike > > You could use the Mysql date functions to format it for you. If your date > fi

Re: [PHP] Date function

2001-08-15 Thread David Robley
On Thu, 16 Aug 2001 00:38, Mike Mike wrote: > Hello, > I'm pulling a date out of MySQL as 2001-10-18. > How do I make it print October 18 in php? > Thanks much > --Mike You could use the Mysql date functions to format it for you. If your date field is called date and is a date type: SELECT CO

Re: [PHP] Date function

2001-08-15 Thread Brian C. Doyle
I use $date = explode("-", $msql_date); $date = date("d F",mktime(0,0,0,$date[1],$date[2],$date[0])); At 08:08 AM 8/15/01 -0700, Mike Mike wrote: >Hello, >I'm pulling a date out of MySQL as 2001-10-18. >How do I make it print October 18 in php? >Thanks much > --Mike > >

Re: [PHP] Date function

2001-08-15 Thread ReDucTor
- Original Message - From: "Mike Mike" <[EMAIL PROTECTED]> To: <[EMAIL PROTECTED]> Sent: Thursday, August 16, 2001 1:08 AM Subject: [PHP] Date function > Hello, > I'm pulling a date out of MySQL as 2001-10-18. > How do I make it print October 18 in php? > Thanks much > --Mike > > ___