Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations TouchToneTommy on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

date problem

Status
Not open for further replies.

hudo

Programmer
Dec 4, 2003
94
DE
Hello,

I got 4 text items in a form , STARTDATE, STOPDATE (of Data Type: Date),
and STARTTIME, STOPTIME (of Data Type: Datetime) in a form which serve as
input parameters for a stored procedure (all 4 of type date in procedure header)

Then I would like to concatenate STARTDATE and STARTTIME to datestart
and STOPDATE and STOPTIME to datestop with:

datestart VARCHAR2(20);
datestart := TO_CHAR(STARTDATE, 'dd.mm.yyyy')||' '||TO_CHAR(STARTTIME, 'hh24:mi');


The procedure includes
SELECT ONE, TWO, THREE FROM MYTABLE
WHERE TIMECOL >= TO_DATE(datestart,'dd.mm.yyyy HH24:MI')
AND TIMECOL <= TO_DATE(datestop,'dd.mm.yyyy HH24:MI')

But this seems not to work.

Please help
 
Can you show the exact code portions from the form and procedure?

When you say it doesn't work, how exactly does it not work?

You might consider making your time fields of type TIME instead of DATETIME.
 
I am Not an Expert But Try My COde ( Hope It Work)
=-=-=-=-=-=-=-=-=-=-=-=-=
SELECT TO_CHAR(STARTDATE,'MMDDYYYY')||':'||TO_CHAR(STARTTIME,'HH24:MI'),
TO_CHAR(ENDDATE,'MMDDYYYY')||':'||TO_CHAR(ENDTIME,'HH24:MI')
INTO datestart,datestop From TABLE_NAME <where clause> ;
=-=-=-=-=-=-=-=-=-=-=-=-=

This Will Contatenate The Date&Time
Further i Cant Understand What U Want To DO.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top