AndrewForrest
Programmer
Hi All,
I am reading a SQL database and putting dates into an excel cell. The date field is stored as a numeric yyyymmdd -20040124 - I am converting the date to dd/mm/yyyy 24/01/2004 (European/Australian format), before loading into the date(dd-mmm-yyyy - 24-Jan-2004) formated cell, this works fine for any date with the day portion >12 otherwise 04/01/2004 (4th Jan) displays as 01-Apr-2004.
EXCEL CODE :-
strF = "f" & Trim(Str(intN))
Range(strF).Select
ActiveCell.FormulaR1C1 =
DateDMY(rs"OEORDLIN_SQL.request_dt"
)
DateDMY() is a functon that converts the date as described above
Windows Regional Settings
Your Local= English(Australian)
Date = d/MM/yyyy
I am reading a SQL database and putting dates into an excel cell. The date field is stored as a numeric yyyymmdd -20040124 - I am converting the date to dd/mm/yyyy 24/01/2004 (European/Australian format), before loading into the date(dd-mmm-yyyy - 24-Jan-2004) formated cell, this works fine for any date with the day portion >12 otherwise 04/01/2004 (4th Jan) displays as 01-Apr-2004.
EXCEL CODE :-
strF = "f" & Trim(Str(intN))
Range(strF).Select
ActiveCell.FormulaR1C1 =
DateDMY(rs"OEORDLIN_SQL.request_dt"
DateDMY() is a functon that converts the date as described above
Windows Regional Settings
Your Local= English(Australian)
Date = d/MM/yyyy