EnviroInsite Forum

Members Login
Username 
 
Password 
    Remember Me  
Post Info TOPIC: Error - GetDate Specified Cast is Not Valid


Senior Member

Status: Offline
Posts: 271
Date:
Error - GetDate Specified Cast is Not Valid
Permalink  
 


When I try to plot charts, I get the error message:

GetDate

Specified Cast is not valid.

at System.Data.Odbc.OdbcDataReader.GetDatetime(Int32 i)

at ei_dblib3.ObsTbl.GetDate() inĀ 

C:\Users\Bruce\Documents\ei\ei_2012\ei_dblib3\ObsTbl.cs:line422



__________________


Senior Member

Status: Offline
Posts: 271
Date:
Permalink  
 

The problem is that you have imported the data from another database and Excel is not recognizing the contents of the Date column as dates.

(1) Create a new column. Then select the column and right-click on it and select Format Cells...
(2) Select Date and then select the format that looks like 3/14/01 13:30. Click OK.
(3) Enter 1/1/01 12:00 in the second row.
(4) In the third row enter "=DATEVALUE(C3)+TIMEVALUE(C3)" where C3 is the original date column.
(5) Copy the new formula to the other rows.
(6) Save the file and try it again in EnviroInsite.


__________________
Page 1 of 1  sorted by
 
Quick Reply

Please log in to post quick replies.



Create your own FREE Forum
Report Abuse
Powered by ActiveBoard