If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

 
Go Back  dBforums > Data Access, Manipulation & Batch Languages > ANSI SQL > Displaying Date in SQL View

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-07-02, 07:18
xzone xzone is offline
Registered User
 
Join Date: Jan 2002
Location: UK
Posts: 67
Displaying Date in SQL View

Hi,

I am a preety newbie to SQL and was wondering how to get the date from the SQL to show up as Format(Date, "dd/mm/yyyy").

TIA.

Rohit
__________________
Reply With Quote
  #2 (permalink)  
Old 10-07-02, 07:22
andrewst andrewst is offline
Moderator.
 
Join Date: Sep 2002
Location: UK
Posts: 5,171
Re: Displaying Date in SQL View

It depends on your DBMS. For Oracle, it is TO_CHAR( date, 'DD/MM/YYYY' )
__________________
Tony Andrews
http://tinyurl.com/tonyandrews
Reply With Quote
  #3 (permalink)  
Old 10-07-02, 07:25
xzone xzone is offline
Registered User
 
Join Date: Jan 2002
Location: UK
Posts: 67
Thanks a lot sir,

My problem was to get this value somehow.

Thanks a lot for your help.

rohit
__________________
Reply With Quote
  #4 (permalink)  
Old 11-13-02, 04:28
pcmbalaji pcmbalaji is offline
Registered User
 
Join Date: Jul 2002
Location: India
Posts: 13
Smile

if it is SQL Server you can use Convert function to convert the date into any format for ex: Select Convert(Varchar(10), GetDate() ,101)
will give you the date in mm/dd/yyyy format.
it depends upon the No you provide in the convert function, 101 stands for "mm/dd/yyyy" format

Balaji

__________________
Balaji
Reply With Quote
Reply

Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

BB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On