View Single Post
  #2   Report Post  
Posted to microsoft.public.excel.setup
Vladimir Vladimir is offline
external usenet poster
 
Posts: 13
Default 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