Logo 
Search:

MS Office Answers

Ask Question   UnAnswered
Home » Forum » MS Office       RSS Feeds
  Question Asked By: Ashley Smith   on Aug 27 In MS Office Category.

  
Question Answered By: Davi Costa   on Aug 27

The web  format has recently changed again and I can now give further
information.

The run-time error fails on "rCell.Select" because the value for
strdate is "10/02/2008" (meaning 2nd October 2008) and this value is
not available to be found in column FN because the date  format for
column FN is set to dd/mm/yyyy. In dd/mm/yyyy format  "10/02/2008" was
a Sunday and as this was a non-trading day no such date exists in
column FN, hence the runtime failure. However, when strdate value is
"10/03/2008" (meaning 3rd October 2008) the "rCell.Select" does not
fail but selects 10th March 2008 because this date does exist in
column FN in dd/mm/yyyy format. The problem  is being caused by the
variable date format (dd/mm/yyyy vs mm/dd/yyyy) being returned by the
web query, but I don't really know how I can address this problem
other than by writing a routine to coerce mm/dd/yyyy formatted dates
into dd/mm/yyyy format, which I have no idea how to do at the momemt,
and which might still be problematic when it comes to dates such as
06/07/2008 - it is not obvious from the date alone whether or not it
should be coerced.

Share: 

 

This Question has 8 more answer(s). View Complete Question Thread

 
Didn't find what you were looking for? Find more on Problem with date formats and searching Or get search suggestion and latest updates.


Tagged: