pg.ddx.io  pgsql-php@postgresql.org mailing list archive  
help / color / mirror / Atom feed
Date functions
3+ messages / 3 participants
[nested] [flat]

* Date functions
@ 2001-05-17 12:51  Carlos Felipe Zirbes <carlosz@dbserver.com.br>
  0 siblings, 2 replies; 3+ messages in thread

From: Carlos Felipe Zirbes @ 2001-05-17 12:51 UTC (permalink / raw)
  To: pgsql-php


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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Date functions
@ 2001-05-17 13:35  Adam Lang <aalang@rutgersinsurance.com>
  parent: Carlos Felipe Zirbes <carlosz@dbserver.com.br>
  1 sibling, 0 replies; 3+ messages in thread

From: Adam Lang @ 2001-05-17 13:35 UTC (permalink / raw)
  To: pgsql-php

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




^ permalink  raw  reply  [nested|flat] 3+ messages in thread

* Re: Date functions
@ 2001-05-17 13:41  Alexandr Listopad <laa@laa.zp.ua>
  parent: Carlos Felipe Zirbes <carlosz@dbserver.com.br>
  1 sibling, 0 replies; 3+ messages in thread

From: Alexandr Listopad @ 2001-05-17 13:41 UTC (permalink / raw)
  To: Carlos Felipe Zirbes <carlosz@dbserver.com.br>; +Cc: pgsql-php

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



^ permalink  raw  reply  [nested|flat] 3+ messages in thread


end of thread, other threads:[~2001-05-17 13:41 UTC | newest]

Thread overview: 3+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2001-05-17 12:51 Date functions Carlos Felipe Zirbes <carlosz@dbserver.com.br>
2001-05-17 13:35 ` Adam Lang <aalang@rutgersinsurance.com>
2001-05-17 13:41 ` Alexandr Listopad <laa@laa.zp.ua>

This inbox is served by DDX for PostgreSQL; see mirroring instructions
for how to clone and mirror all data and code used for this inbox