Current Year

Started by Hunter Hillegasabout 25 years ago2 messagesgeneral
Jump to latest
#1Hunter Hillegas
hunter@lastonepicked.com

I have an HTML form that submits to Postgre 7.1 beta 4 and I'm wondering how
to get the current year from the database...

Basically they are entering dates but all I want them to have to enter is
the month and the day of the month and then get the current year from the DB
and programmatically fuse them together...

Also, is there a good reference to the PostgreSQL function library? I've
looked around and can't seem to find one.

Thanks,
Hunter
--
Hunter Hillegas
hunter@lastonepicked.com

#2Peter Eisentraut
peter_e@gmx.net
In reply to: Hunter Hillegas (#1)
Re: Current Year

Hunter Hillegas writes:

I have an HTML form that submits to Postgre 7.1 beta 4 and I'm wondering how
to get the current year from the database...

select extract(year from current_date);

Also, is there a good reference to the PostgreSQL function library? I've
looked around and can't seem to find one.

http://www.postgresql.org/users-lounge/docs/7.0/user/functions.htm

--
Peter Eisentraut peter_e@gmx.net http://yi.org/peter-e/