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: 1
Default wrong date returned on ws.Cells(r,c).value


I have writen a vb6 app that extracts user-entered data from a
spreadsheet and loads it into an oracle database. It all works fine
apart from some of the date values in the spreadsheet being returned
incorrectly.

For example when debugging the var strRowValue in the code snippet
below,
01/01/1900 00:00 in the spreadsheet is returned as 31/12/1889
02/01/1900 00:00 in the spreadsheet is returned as 31/01/1900
01/05/2005 is correctly returned

Set ws = wb.Worksheets(UCase(strTables(i)))
strRowValue = ws.Cells(iRow, iCol).Value

The spreadsheet uses the 1900 system and the format of the cells that
the dates are held in is "Custom - 'dd/mm/yyyy hh:mm'"

Any ideas would be very appreciated.

Shawn


--
sbvb
------------------------------------------------------------------------
sbvb's Profile: http://www.excelforum.com/member.php...o&userid=24604
View this thread: http://www.excelforum.com/showthread...hreadid=381924

 
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
Wrong output returned during IF function jb333 Excel Worksheet Functions 3 March 16th 09 04:44 PM
When I put in 022806, date is returned as 06/09/62. Why? Barbara Excel Discussion (Misc queries) 3 April 6th 06 09:07 PM
I need today's date returned as date format in formula CMIConnie Excel Discussion (Misc queries) 2 February 23rd 06 04:38 PM
Value returned from Formula changes with the Date Jeff Excel Worksheet Functions 6 December 29th 05 02:48 AM
Wrong result returned by UsedRange.Rows.Count j[_4_] Excel Programming 3 June 20th 05 09:03 PM


All times are GMT +1. The time now is 04:44 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"