Thread: Date functions

Date functions

From
Carlos Felipe Zirbes
Date:
Hi.

What's the best way to get current year, current month and current day?
I need something like:
$year = year();
$month= month();
$day=day();

TIA,

Carlos Felipe Zirbes
DBServer Assessoria em Sistemas de Informação
E-mail: carlosz@dbserver.com.br
Fone: (51) 342-8055
Fax: (51) 342-4838

Re: Date functions

From
"Adam Lang"
Date:
Use get date.  It returns an array of all that info for you.

http://php.net/manual/en/function.getdate.php

Adam Lang
Systems Engineer
Rutgers Casualty Insurance Company
http://www.rutgersinsurance.com
----- Original Message -----
From: "Carlos Felipe Zirbes" <carlosz@dbserver.com.br>
To: "[PHP] PostgreSQL" <pgsql-php@postgresql.org>
Sent: Thursday, May 17, 2001 8:51 AM
Subject: [PHP] Date functions


>
> Hi.
>
> What's the best way to get current year, current month and current day?
> I need something like:
> $year = year();
> $month= month();
> $day=day();
>
> TIA,
>
> Carlos Felipe Zirbes
> DBServer Assessoria em Sistemas de Informação
> E-mail: carlosz@dbserver.com.br
> Fone: (51) 342-8055
> Fax: (51) 342-4838
>
> ---------------------------(end of broadcast)---------------------------
> TIP 1: subscribe and unsubscribe commands go to majordomo@postgresql.org


Re: Date functions

From
Alexandr Listopad
Date:
On Thu, May 17, 2001 at 09:51:44AM -0300, Carlos Felipe Zirbes wrote:
>
> Hi.
>
> What's the best way to get current year, current month and current day?
> I need something like:
> $year = year();

$year = date("Y");

> $month= month();

$month = date("m"); or date("F");

> $day=day();

$day = date("d"); or ...

see function.date.html for date() function.

GoodLuck! :-)

--
 Laa

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html




Re: Date functions

From
Alexandr Listopad
Date:
On Thu, May 17, 2001 at 09:51:44AM -0300, Carlos Felipe Zirbes wrote:
>
> Hi.
>
> What's the best way to get current year, current month and current day?
> I need something like:
> $year = year();

$year = date("Y");

> $month= month();

$month = date("m"); or date("F");

> $day=day();

$day = date("d"); or ...

see function.date.html for date() function.

GoodLuck! :-)

--
 Laa

---------------------------(end of broadcast)---------------------------
TIP 5: Have you checked our extensive FAQ?

http://www.postgresql.org/users-lounge/docs/faq.html