Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with Date Format

Hi guys

I have a sheet which opens up 5 other sheets in turn to obtain data.

4 of the sheets have info in columns next to a date column

(eg)

07/11/2007 : xxx : xxx
07/11/2007 : xxx : xxx

But when my VB opens the sheets the dates change from

07/11/2007 (UK) to 11/07/2007 (US).

I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to
open the file. (FPATH and BO_TEMP are variables defined earlier in the code).

Any ideas on why this is?
Thanks!
  #2   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 9
Default Help with Date Format

Dan,

I think that what you're encountering is a regional setting on your computer
(or maybe in Excel). Excel stores a date as a "date". The format that the
date shows up in is dependent on the default on your system.

Chris

--
Chris Farkas
Excel/Access Developer
http://www.eAlchemy.biz


"Dan V" wrote:

Hi guys

I have a sheet which opens up 5 other sheets in turn to obtain data.

4 of the sheets have info in columns next to a date column

(eg)

07/11/2007 : xxx : xxx
07/11/2007 : xxx : xxx

But when my VB opens the sheets the dates change from

07/11/2007 (UK) to 11/07/2007 (US).

I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to
open the file. (FPATH and BO_TEMP are variables defined earlier in the code).

Any ideas on why this is?
Thanks!

  #3   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 4
Default Help with Date Format

That's what I thought, however, opening the sheet on it's own and the dates
are in UK format - open the same sheet using VB in the master sheet and the
dates are in US format... ?????

"eAlchemist" wrote:

Dan,

I think that what you're encountering is a regional setting on your computer
(or maybe in Excel). Excel stores a date as a "date". The format that the
date shows up in is dependent on the default on your system.

Chris

--
Chris Farkas
Excel/Access Developer
http://www.eAlchemy.biz


"Dan V" wrote:

Hi guys

I have a sheet which opens up 5 other sheets in turn to obtain data.

4 of the sheets have info in columns next to a date column

(eg)

07/11/2007 : xxx : xxx
07/11/2007 : xxx : xxx

But when my VB opens the sheets the dates change from

07/11/2007 (UK) to 11/07/2007 (US).

I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to
open the file. (FPATH and BO_TEMP are variables defined earlier in the code).

Any ideas on why this is?
Thanks!

  #4   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 15
Default Help with Date Format

Try this out. It might be a way around your issue.

Reference the date in a corresponding column.
Format the new column to the "US" date format.
Hie it if necessary.
Use that column when referencing data in your macro.

Does it revert back to the UK date?


"Dan V" wrote:

That's what I thought, however, opening the sheet on it's own and the dates
are in UK format - open the same sheet using VB in the master sheet and the
dates are in US format... ?????

"eAlchemist" wrote:

Dan,

I think that what you're encountering is a regional setting on your computer
(or maybe in Excel). Excel stores a date as a "date". The format that the
date shows up in is dependent on the default on your system.

Chris

--
Chris Farkas
Excel/Access Developer
http://www.eAlchemy.biz


"Dan V" wrote:

Hi guys

I have a sheet which opens up 5 other sheets in turn to obtain data.

4 of the sheets have info in columns next to a date column

(eg)

07/11/2007 : xxx : xxx
07/11/2007 : xxx : xxx

But when my VB opens the sheets the dates change from

07/11/2007 (UK) to 11/07/2007 (US).

I am using nothing other than "Workbooks.Open Filename:=FPATH & BO_TEMP" to
open the file. (FPATH and BO_TEMP are variables defined earlier in the code).

Any ideas on why this is?
Thanks!

Reply
Thread Tools Search this Thread
Search this Thread:

Advanced Search
Display Modes

Posting Rules

Smilies are On
[IMG] code is On
HTML code is Off
Trackbacks are On
Pingbacks are On
Refbacks are On


Similar Threads
Thread Thread Starter Forum Replies Last Post
permanent conversion of 1904 date format to 1900 date format Jos Excel Worksheet Functions 4 November 26th 15 02:48 PM
How do I convert dd/mm/yy date format to yyddd Julian date format itzy bitzy[_2_] Excel Worksheet Functions 8 December 11th 09 03:20 AM
convert serial date format to normal date format Flagworld Excel Discussion (Misc queries) 3 September 23rd 08 01:32 PM
code to convert date from TEXT format (03-02) to DATE format (200203) Gauthier[_2_] Excel Programming 0 September 22nd 04 03:26 PM
Change a date in text format xx.xx.20xx to a recognised date format concatenator Excel Programming 1 November 24th 03 11:33 PM


All times are GMT +1. The time now is 09:41 AM.

Powered by vBulletin® Copyright ©2000 - 2025, Jelsoft Enterprises Ltd.
Copyright ©2004-2025 ExcelBanter.
The comments are property of their posters.
 

About Us

"It's about Microsoft Excel"