Page 1 of 1

Excel (xlsx) DB and date/time

Posted: Sat Sep 26, 2015 11:48 am
by icevault
I have attached an Excel file (xlsx) as a database and I'm trying to set up the SELECT statement to pull the appropriate data.

The Excel has one column for DATE and a separate one for TIME. The formats are mm/dd/yyyy and hh:mm:ss am/pm.

When I hit refresh to display the result, it shows the DATE as mm/dd/yyyy hh:mm:ss am/pm and the TIME column sows the following:
Error: date out of range!

Everything looks fine on the Excel file. Any ideas why this error appears?

Re: Excel (xlsx) DB and date/time

Posted: Tue Sep 29, 2015 1:43 pm
by Martin-Noventri
Hi icevault,

It could be that the Excel column is not set to the applicable format. The "general" format is the default for Excel, so make sure the columns are set to the appropriate format for your data type .

Another option is to cast it with the appropriate function in the select statement, such as Cstr, CDate etc. in Noventri Suite.

Kind regards,
Martin