Results 1 to 8 of 8

Thread: Access

  1. #1

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    32
    This is not strickly a vb question but there are vb aspects to the thing i am producing.

    I have a table and the date fields have to be text (long story don't ask why)

    I have a query in access, where basically i need that date in date format (not text). so heres the question, how do i convert the text into a date (in the text field it is in the format of dd/mm/yyyy eg 01/05/2000).

    remember I am doing this in a query so i don't really want huge amounts of code.

    Thanks


  2. #2
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    Do you have VBA version 6? (Office 2000) If you do, use the Split function. Otherwise, there's probably a tip on it on this website. If you can't find one, I'll knock one together for you (port from some C++ I did a few weeks ago).
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

  3. #3

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    32
    No I just have the standard access97 on my pc. Remember I need to be able to place this in query

    Thanks


  4. #4
    Lively Member
    Join Date
    Jun 2000
    Location
    Ontario, Canada.
    Posts
    85

    Question

    I think maybe the CVDate function in VB will do the conversion for you. What are you doing that needs the field
    to be converted. Are you using a SQL statement or what???


  5. #5

    Thread Starter
    Member
    Join Date
    Jun 2000
    Posts
    32
    Sorry Jimmer don't the CVdate can be used in the access97 query just tried it

  6. #6
    Guru Clunietp's Avatar
    Join Date
    Oct 1999
    Location
    USA
    Posts
    1,844
    what about CDate

    Cdate converts a string date to a date date....is that all you need to do?

  7. #7
    New Member
    Join Date
    Jun 2000
    Posts
    9
    if im understanding good you need a textbox to fill out a date.

    1. you can use a maskbox if you want.
    2. if you need a textbox for a date this is what you need to do :

    If Format(txtdateofbirth, "dd/mm/yyyy") = txtdateofbirth.Text Then


    hope thats help

    amit lipaz

  8. #8
    Monday Morning Lunatic parksie's Avatar
    Join Date
    Mar 2000
    Location
    Mashin' on the motorway
    Posts
    8,169
    I think SQL has some features for conversion of things like that, but I'll have to check.

    >>> runs to library >>> will return in a few days >>>
    I refuse to tie my hands behind my back and hear somebody say "Bend Over, Boy, Because You Have It Coming To You".
    -- Linus Torvalds

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •  



Click Here to Expand Forum to Full Width