Click to See Complete Forum and Search --> : Access
EscapeUK
Jun 28th, 2000, 01:07 AM
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
parksie
Jun 28th, 2000, 01:23 AM
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).
EscapeUK
Jun 28th, 2000, 01:32 AM
No I just have the standard access97 on my pc. Remember I need to be able to place this in query
Thanks
Jimmer
Jun 28th, 2000, 01:32 AM
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???
EscapeUK
Jun 28th, 2000, 01:36 AM
Sorry Jimmer don't the CVdate can be used in the access97 query just tried it
Clunietp
Jun 28th, 2000, 12:11 PM
what about CDate
Cdate converts a string date to a date date....is that all you need to do?
arale
Jun 28th, 2000, 07:23 PM
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
parksie
Jun 30th, 2000, 12:18 PM
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 >>>
vbforums.com
Copyright Internet.com Inc., All Rights Reserved.