Home » SQL & PL/SQL » SQL & PL/SQL » Oracle Date and Time Format in Cold Fusion
Oracle Date and Time Format in Cold Fusion [message #155513] Mon, 16 January 2006 19:54 Go to next message
farahatikah
Messages: 1
Registered: January 2006
Location: KL
Junior Member

I have created a form in Cold Fusion. This form contains for paramaters.
1) Credit Date From (C1)- one text box
2) Credit Time From (D1) - one text box
3) Credit Date To (C2) - one text box
4) Credit Time To (D2) - one text box

In my table, Credit Date is in MM/DD/YYYY HH:MM:SS example:1/11/2006 3:30:25 PM (represent January 11, 2006 3:30pm)

My question is how do I concate the value so my SQL statement will look something like

Select ......
Where Credit_Date >= parameter1 --(C1||D1)
And Credit_Date <= parameter2 --(C2||D2)

Please assist. Thanks
Re: Oracle Date and Time Format in Cold Fusion [message #264888 is a reply to message #155513] Tue, 04 September 2007 23:01 Go to previous messageGo to next message
hasan_uiu
Messages: 18
Registered: August 2007
Location: Dhaka
Junior Member



use Concat ()
example : SELECT CONCAT('Dan ', 'Morgan') FROM dual;
Re: Oracle Date and Time Format in Cold Fusion [message #264891 is a reply to message #155513] Tue, 04 September 2007 23:08 Go to previous message
BlackSwan
Messages: 25047
Registered: January 2009
Location: SoCal
Senior Member
Be very, very wary of comparing strings and date datatypes.
In Oracle strings are enclosed by single quote marks; such as 'This is a date 2007-12-31 string'.
If you want to create a DATE datatype, then use TO_DATE function.
Previous Topic: compare date (month & year)
Next Topic: output of date format (merged)
Goto Forum:
  


Current Time: Wed Dec 07 14:39:07 CST 2016

Total time taken to generate the page: 0.09474 seconds