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 > Create date Function using SQL

Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1 (permalink)  
Old 10-26-03, 22:05
Twinki Twinki is offline
Registered User
 
Join Date: Oct 2003
Posts: 5
Create date Function using SQL

Do anyone know any functions in SQL to create a new date using numeric numbers eg.

day=1, month=2 , year=2003

final = 01/02/2003


please help thanks
Reply With Quote
  #2 (permalink)  
Old 10-27-03, 05:01
ndu35 ndu35 is offline
Registered User
 
Join Date: May 2003
Location: France
Posts: 112
Re: Create date Function using SQL

to_date(lpad(day,2,'0')||'/'||lpad(month,2,'0')||'/'||year,'dd/mm/yyyy')

Quote:
Originally posted by Twinki
Do anyone know any functions in SQL to create a new date using numeric numbers eg.

day=1, month=2 , year=2003

final = 01/02/2003


please help thanks
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