ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   "Date" format after CSV import... (https://www.excelbanter.com/excel-programming/329486-date-format-after-csv-import.html)

Mike Iacovou

"Date" format after CSV import...
 
Gethi all
many thanks in anticipation.
i am "importing" data from a CSV file by opening the CSV file in vba using
GetOpenFilename. Once open, I am copy/pasting data from sheet(1) into
previously active workbook into sheet(1), then closing the CSV file.
The data imports OK, with the data in columns etc. What I have noticed is
that the dates can be considered as "text" (ie left-aligned in cell) or
"dates" (right-aligned). While IsDate() recognised both as dates, any date
function / analysis does not correctly interpret the date in the former.
If i select cell formatting and choose "date" etc, it doesn't make any
difference to the cell. The only data option i have found to change the
format is to use "text-to-columns" on that column... which itself can
introduce some errors...
i really need a way to debug the dates to ensure they are valid, and will be
processed correctly.
many thanks

Mike


All times are GMT +1. The time now is 10:16 AM.

Powered by vBulletin® Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
ExcelBanter.com