Conversion Text to Date

  • Thread starter Thread starter Guest
  • Start date Start date
Hi,


CDate( string )


should do, as long as the string holds a date in the appropriate format.
OLEAUT32 is involved, and some "date" can surprise you. As example, the
following 3 strings return the same date:

? CDate("2005.10.31"), CDate("10.31.2005"), CDate("31.10.2005")
2005.10.31 2005.10.31 2005.10.31


which sounds like what we want, but if both day and month value are less
that 12, you may not get the "month" you expect.


Hoping it may help,
Vanderghast, Access MVP
 

Ask a Question

Want to reply to this thread or ask your own question?

You'll need to choose a username for the site, which only take a couple of moments. After that, you can post your question and our members will help you out.

Ask a Question

Back
Top