User Name Password Register
DaniWeb IT Discussion Community
All
What is DaniWeb IT Discussion Community?
You're currently browsing the Database Design section within the Web Development category of DaniWeb, a massive community of 422,814 software developers, web developers, Internet marketers, and tech gurus who are all enthusiastic about making contacts, networking, and learning from each other. In fact, there are 3,372 IT professionals currently interacting right now! Registration is free, only takes a minute and lets you enjoy all of the interactive features of the site.
Please support our Database Design advertiser: Programming Forums
Views: 1183 | Replies: 1
Reply
Join Date: Aug 2006
Posts: 999
Reputation: EnderX is an unknown quantity at this point 
Rep Power: 4
Solved Threads: 1
EnderX EnderX is offline Offline
Posting Shark

PSQL problem

  #1  
Sep 1st, 2006
I do not know if this is the right place for this message to go, but there does not appear to be a forum specifically set up for the users of the PostgreSQL database, so this was the best match I could find.

Does anyone know what function or functions in Postgres would return the current date, and only that? I know of the 'now()' function, which returns the date and the timestamp, but that's no good for me; I need something which can separate the date and return only it. I'm currently building a program which requires a 'search by date' option, and the timestamp attached to the now command throws it off; no records appear in the returned set.

Anyone have any suggestions?
AddThis Social Bookmark Button
Reply With Quote  
Join Date: Oct 2005
Location: Manchester, UK
Posts: 482
Reputation: pty is on a distinguished road 
Rep Power: 3
Solved Threads: 33
pty's Avatar
pty pty is offline Offline
Posting Pro in Training

Re: PSQL problem

  #2  
Sep 10th, 2006
glad to see a postgresql user

i think what you're after is:

bc_dev=# select current_date;
    date    
------------
 2006-09-10
(1 row)
Note to self... pocket cup
Reply With Quote  
Reply

Only community members can participate in forum threads. You must register or log in to contribute.

DaniWeb Database Design Marketplace
Currently Active Users Viewing This Thread: 1 (0 members and 1 guests)

 

Thread Tools Display Modes

Similar Threads
Other Threads in the Database Design Forum

All times are GMT -4. The time now is 10:17 pm.
Forum system based on vBulletin Copyright ©2000 - 2008, Jelsoft Enterprises Ltd.
©2003 - 2008 DaniWeb® LLC