Reply
 
LinkBack Thread Tools Search this Thread Display Modes
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 39
Default English and American dates...

Hiya

Dunno how many Americans out there are aware of this issue
but basically us Brits like to display our dates in a
dd/mm/yyyy format whilst I understand Americans use
mm/dd/yyy.

Excel understandably prefers to use American date formats
but my programs needs to use English.

I am copying data from a CSV file into an excel
spreadsheet using the copy and paste methods within VBA.
Unfortunately a date such as 01/04/2000 which is the first
of April 2000 ends up as 04/01/2000 which is the fourth of
January.

The code looks something like:

Workbooks.Open WorkBookName

ActiveSheet.Cells.SpecialCells(xlCellTypeLastCell) .Activate
LastColumnNum = ActiveCell.Column
LastRowNum = ActiveCell.Row

Range(Cells(1, 1), Cells(LastRowNum, LastColumnNum)).Copy
ActiveWorkbook.Close False

ThisWorkbook.Worksheets("Temp Data"). _
Range(PasteCell).PasteSpecial xlPasteAll

Could someone sketch out a code that would copy and paste
the data as seen in a text format. I can then write a mid
function which will do all the work for me.

Thanks in advance,

If this is a bit confusing say so and I'll explain further

Nick
  #2   Report Post  
Posted to microsoft.public.excel.programming
No Name
 
Posts: n/a
Default English and American dates...

Actually I might have sorted this using the xlPasteValue
variable.

This pastes the dates as a serial number.

I think I can retrieve the correct parts of the date using
the DAY, MONTH, YEAR functions.

Nick
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
Using english and non-English Excel commands simultaneously in anon-English installation Michael.Tarnowski Excel Worksheet Functions 6 March 12th 10 07:21 AM
Convert Amercan dates to English dates Karen Souter Excel Discussion (Misc queries) 2 December 21st 09 03:54 PM
Format dates from English to Spanish FA Excel Worksheet Functions 2 January 9th 09 01:09 PM
how do I convert English (Canadian) dates to English (US) dates dinertx Excel Worksheet Functions 1 July 11th 08 03:59 PM
Save .csv file. English (American) Settings belitre[_3_] Excel Programming 0 May 17th 04 02:38 PM


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

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

About Us

"It's about Microsoft Excel"