LinkBack Thread Tools Search this Thread Display Modes
Prev Previous Post   Next Post Next
  #1   Report Post  
Posted to microsoft.public.excel.programming
external usenet poster
 
Posts: 3
Default VBA date errors


Can I add my experience in the hope that Microsoft may be tempted to fix
their error generation feature.
My workaround may also be of some use to others.
I use English Regional settings and imported a file to a spreadsheet
using DMY date settings. With VBA I set a string variable s to the
contents of a cell which contained 10/06/2005. When (without further
processing) s was stored in a new location, that cell showed 6/10/2005 -
i.e. it had been converted to US format.
I attempted to force the correct format by interposing
s = FormatDateTime(s,2) but this had no effect. However, changing this
to s= FormatDateTime(s,1) gave Friday, 10 June 2005, which is cumbersome
- but at least it is correct.

boofhead


*** Sent via Developersdex http://www.developersdex.com ***
 
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
VLOOKUP Errors with Date formats Sam Excel Worksheet Functions 1 April 30th 09 05:35 AM
Excel Throwing Circular Errors When No Errors Exist MDW Excel Worksheet Functions 1 August 10th 06 02:15 PM
date formula errors floridasurfn Excel Worksheet Functions 1 June 21st 06 04:29 AM
Chart - date with errors #DIV/0! SBárbara Charts and Charting in Excel 2 June 8th 06 10:08 AM
Unresolved Errors in IF Statements - Errors do not show in results Markthepain Excel Worksheet Functions 2 December 3rd 04 08:49 AM


All times are GMT +1. The time now is 01:24 PM.

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"