By using this site, you agree to our updated Privacy Policy and our Terms of Use. Manage your Cookies Settings.
431,872 Members | 2,392 Online
Bytes IT Community
+ Ask a Question
Need help? Post your question and get tips & solutions from a community of 431,872 IT Pros & Developers. It's quick & easy.

date format in postgresql database

P: 60
Hi

In postgresql database how to retrieve the date in a required format ? Is ther any method
to retrieve the stored date value in mm/dd/yyyy format. I don't want to set the date format in postgres databse . Whatever format the date value stored , is there any method to retrieve the date in any required format ?
Pls post your replies

Thank n advance
somas
Aug 18 '06 #1
Share this Question
Share on Google+
1 Reply


P: 37
Hi

In postgresql database how to retrieve the date in a required format ? Is ther any method
to retrieve the stored date value in mm/dd/yyyy format. I don't want to set the date format in postgres databse . Whatever format the date value stored , is there any method to retrieve the date in any required format ?
Pls post your replies

Thank n advance
somas
please refer to to_char function documentation.
here is a little sample for u:
Expand|Select|Wrap|Line Numbers
  1. SELECT to_char(current_date, 'dd/mm/yyyy')
  2.  
Aug 23 '06 #2

Post your reply

Sign in to post your reply or Sign up for a free account.