ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Setting up and Configuration of Excel (https://www.excelbanter.com/setting-up-configuration-excel/)
-   -   Date problem YYYYMMDD (https://www.excelbanter.com/setting-up-configuration-excel/185126-date-problem-yyyymmdd.html)

Hilco van Olst

Date problem YYYYMMDD
 
We have a problem with excel 2007 NL ;

a date format used as YYYYMMDD is treated as a date format as YYYYDDMM.

When i import a file with a date : 20080405, this is treated as 4th of may
2008 (this should be : 5th of april 2008)
The date 20080513 gives an error

If I'm trying the same in Excel 2000 or Excel 2003, the date is treated the
right way.

I'm using :

Windows server 2003 X64 as a terminal server, with Office 2007 standard NL

Vladimir

Date problem YYYYMMDD
 
If you use the following macro
Code:

Sub ReopenFile()
fileName = Application.ActiveWorkbook.FullName
Application.ActiveWorkbook.Close
Application.Workbooks.Open Filename:=fileName
End Sub

it will reopen the active DBF file with the correct date conversion. Hope
this will help...

Original idea from http://forum.foxclub.ru/read.php?29,326842,page=2

"Hilco van Olst" wrote:

We have a problem with excel 2007 NL ;

a date format used as YYYYMMDD is treated as a date format as YYYYDDMM.

When i import a file with a date : 20080405, this is treated as 4th of may
2008 (this should be : 5th of april 2008)
The date 20080513 gives an error

If I'm trying the same in Excel 2000 or Excel 2003, the date is treated the
right way.

I'm using :

Windows server 2003 X64 as a terminal server, with Office 2007 standard NL



All times are GMT +1. The time now is 06:47 AM.

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