ExcelBanter

ExcelBanter (https://www.excelbanter.com/)
-   Excel Programming (https://www.excelbanter.com/excel-programming/)
-   -   Date Format Problem (https://www.excelbanter.com/excel-programming/329556-date-format-problem.html)

Jason

Date Format Problem
 
Hi,

I am having a frustarting moment here. I have identical workbooks that are
stored on 2 shared network drives (D1 & D2). The workbook stored on D1 works
no problem for the people in my office. The file on D2 formats the date
incorrectly. All the shared drives are in the same server location.

The below code is supposed to output the date as, on the first pass,
1/15/2006 and it does so on the version that I use, D1. The D2 version
outputs the date as 2015-01-06. There is no difference in the code. If the
users that access the D2 version e-mail the workbook to my location the code
executes without any problems. If I access the workbook the workbook
directly on D2 from my location the date format changes to the incorrect
format.

Dim iCount As Integer
Dim begDate(12) As Date

begDate(iCount) = Format(15 & "/" & iCount & "/" &
Worksheets(strSummary).Range("e2").Value, "dd\/mmm\/yy")

I really appreciate any and all help.

jason


Jason

Date Format Problem
 
I figured it out. The Regional optionsDate format in Windows was set
differently on the machines.

Jason

"Jason" wrote:

Hi,

I am having a frustarting moment here. I have identical workbooks that are
stored on 2 shared network drives (D1 & D2). The workbook stored on D1 works
no problem for the people in my office. The file on D2 formats the date
incorrectly. All the shared drives are in the same server location.

The below code is supposed to output the date as, on the first pass,
1/15/2006 and it does so on the version that I use, D1. The D2 version
outputs the date as 2015-01-06. There is no difference in the code. If the
users that access the D2 version e-mail the workbook to my location the code
executes without any problems. If I access the workbook the workbook
directly on D2 from my location the date format changes to the incorrect
format.

Dim iCount As Integer
Dim begDate(12) As Date

begDate(iCount) = Format(15 & "/" & iCount & "/" &
Worksheets(strSummary).Range("e2").Value, "dd\/mmm\/yy")

I really appreciate any and all help.

jason



All times are GMT +1. The time now is 12:03 AM.

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