[AccessD] Date Format Not Working

Stuart McLachlan stuart at lexacorp.com.pg
Sat Jun 27 17:55:26 CDT 2015


Alhzeimers?  

Asked and answered 10 days ago

<quote>
On 17 Jun 2015 at 16:17, Rocky Smolin wrote:

> Dear List:
> 
> Access 2003 - VBA
> 
> Is there a function that will convert a date in a text box formatted ddd
> d-mmm-yyyy (Fri 12-JUN-2015) to short date (mm/dd/yyyy) format?
> 
> MTIA
> 
> Rocky Smolin</quote>

and the solutions:

Datevalue doesn't like the ddd part so you need to strip it.  This works:
Format(datevalue(mid$("Fri 12-JUN-2015",5)),"mm/dd/yyyy")

and

If it is an actual date field in a textbox, explicitly use 
txtSomeDate.Value rather than txtSomeDate  or txtSomeDate.Text 






More information about the AccessD mailing list