dear All
i have two different fields in oracle 10g database named OPD_VISIT_DATE (Date) and START_TIME(Varchar2)
now i want to calculate difference in time elapsed from START_TIME to Now
i used follwing query .. but got error
Error:
ORA-01722: invalid number
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OracleClient.OracleException: ORA-01722: invalid number
Source Error:
Line 115: Dim da = New OracleDataAdapter(strQuery, conn)
Line 116: Dim ds = New DataSet()
Line 117: da.Fill(ds, "PQue")
Line 118:
Line 119: GridView2.DataSource = ds
pl. do needfull
i have two different fields in oracle 10g database named OPD_VISIT_DATE (Date) and START_TIME(Varchar2)
now i want to calculate difference in time elapsed from START_TIME to Now
i used follwing query .. but got error
Code:
strQuery = "select QUE_PTNAME As Name,START_TIME As Arrival,FINAL_STATUS As Status, trunc(sysdate) - START_TIME from OPD_QUE_DTL where " _
+ " substr(OPD_VIST_DATE,1,10) = to_date('" + strCrDate + "','dd-MM-yyyy') " _
+ " and ROOMNO = " + dblRommNo.ToString + " and FINAL_STATUS = '" + strStatus + "' order by ltrim(FINAL_STATUS,'SAERC') Asc,to_date(START_TIME,'hh:mi:ss') ASC"
Dim da = New OracleDataAdapter(strQuery, conn)
Dim ds = New DataSet()
da.Fill(ds, "PQue")
Error:
ORA-01722: invalid number
Description: An unhandled exception occurred during the execution of the current web request. Please review the stack trace for more information about the error and where it originated in the code.
Exception Details: System.Data.OracleClient.OracleException: ORA-01722: invalid number
Source Error:
Line 115: Dim da = New OracleDataAdapter(strQuery, conn)
Line 116: Dim ds = New DataSet()
Line 117: da.Fill(ds, "PQue")
Line 118:
Line 119: GridView2.DataSource = ds
pl. do needfull