I am really having major difficulty with date/time in Oracle.
I just imported an Excel file to Oracle. On the excel file, I have a date column with format mm/dd/yyyy hh:mi (6/27/2007 18:05)
When I imported the excel file (using Oracle SQL developer), I masked the date as mm-dd-yyyy hh:mi.
It imported fine, but the column in Oracle shows as 27-Jun-07.
I have an asp page that will eventually update this date with this statement:
Date_Sub = Now()
strsql = "INSERT INTO tblfinal (Region, Date_Submitted) VALUES ('" & region & "',TO_TIMESTAMP('" & Date_Sub & "','MM/DD/YYYY HH:MI:SS'))"
Comm.commandtype = 1
Comm.commandtext = strsql1
Comm.Execute
Comm.commandtext = strsql
Comm.Execute
This generates an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Oracle][ODBC][Ora]ORA-01830: date format picture ends before converting entire input string
I have another page the will display this column with this:
<tr><td align=left><FONT FACE="Arial" SIZE=2><%=trim(rs("Region"))%></td>
<td align=left><FONT FACE="Arial" SIZE=2><%=FormatDateTime(rs("Date_Submitted"),vbLongDate)%></td>
The first column of the first record was diplayed but got this error on the second column:
error '80020009'
I have googled all these error and am not even close to resolving them.
Any help will be greatly appreciated.
I just imported an Excel file to Oracle. On the excel file, I have a date column with format mm/dd/yyyy hh:mi (6/27/2007 18:05)
When I imported the excel file (using Oracle SQL developer), I masked the date as mm-dd-yyyy hh:mi.
It imported fine, but the column in Oracle shows as 27-Jun-07.
I have an asp page that will eventually update this date with this statement:
Date_Sub = Now()
strsql = "INSERT INTO tblfinal (Region, Date_Submitted) VALUES ('" & region & "',TO_TIMESTAMP('" & Date_Sub & "','MM/DD/YYYY HH:MI:SS'))"
Comm.commandtype = 1
Comm.commandtext = strsql1
Comm.Execute
Comm.commandtext = strsql
Comm.Execute
This generates an error:
Microsoft OLE DB Provider for ODBC Drivers error '80004005'
[Oracle][ODBC][Ora]ORA-01830: date format picture ends before converting entire input string
I have another page the will display this column with this:
<tr><td align=left><FONT FACE="Arial" SIZE=2><%=trim(rs("Region"))%></td>
<td align=left><FONT FACE="Arial" SIZE=2><%=FormatDateTime(rs("Date_Submitted"),vbLongDate)%></td>
The first column of the first record was diplayed but got this error on the second column:
error '80020009'
I have googled all these error and am not even close to resolving them.
Any help will be greatly appreciated.