VBA: Convert a text field to date.

titine31 -  
 Titio -
Hello,
I'm working in Access and I have a data type issue in my database.
My database comes from a link with an Excel (.csv) file and all fields are in "text" format.

I want to work with dates and make queries searching for information between two dates. But since my field is in text format, it doesn't work.
Can someone help me?

Here’s how my date is displayed (in text format): 01/01/2007/0:0:0

Thanks in advance and see you soon ;)
Configuration: Windows XP Internet Explorer 6.0

6 answers

  1. Fing
     
    Hello
    CDATE is a VB function, so to use it you need to convert the fields datefin and datedeb to the date format
    then when saving the data in these fields, use CDATE for formatting the text as a date
    The rest is very simple.
    Thank you
    2