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
 
Back
Top