Hi All,
As the title says, date fields are between Calc and MYSQL are driving around the twist,
This question could fall in the gap between the two of them.
what I have is a spread sheet for which part cells A1 and A2 are formatted as date “D MMM YYYY”
using a macro I grab the cell values like this
inv_date = Sheet1.getCellRangeByName("A1").value
paid_date = Sheet1.getCellRangeByName("A2").value
I have tried setting the data type to date
Dim inv_date as date
but this just errors with
BASIC runtime error.
Property or method not found: date.
if I use the .value it does display the correct date
print inv_date
from there I export the data to mysql
strSQL6 = " update work.invoices_payable set inv_date = '" & inv_date & "' where entry_id = '" & entry_number & "'"
now for the MYSQL (Via Base) bit, my field name is also called inv_date,
if I format this as a “date” field
this display “3 jan 0001” in base no matter what date i put in the calc cell
if the "inv_date is formated as “INT” it does display the correct date but i cannot query the date with
select date(inv_date) from work.invoices_payable
as this just give me a NULL value.
I need to be able to query the dates for this to work for me
Any sugestions?
Neil