dates

  • Thread starter Thread starter Bill H.
  • Start date Start date
B

Bill H.

The table has a text field containing data looking like dates. IOW, date
info was put into a text field.

Now, I want to display on a form that text field, but I what it to be a real
date so that I can do date ranges using filter by form.

How do you convert a text string that looks like a date into a real date?

Thx.
 
The table has a text field containing data looking like dates. IOW, date
info was put into a text field.

Now, I want to display on a form that text field, but I what it to be a real
date so that I can do date ranges using filter by form.

How do you convert a text string that looks like a date into a real date?

Thx.

What does the text string look like?
January 15, 2008 or 1/15/2008 or Thursday, July 17, 2008, or Nov. 15,
2008, etc.

CDate([FieldName])
will make a date value out of all of the above EXCEPT "Thursday, July
17, 2008"
 
like this "12/4/08"


fredg said:
The table has a text field containing data looking like dates. IOW, date
info was put into a text field.

Now, I want to display on a form that text field, but I what it to be a
real
date so that I can do date ranges using filter by form.

How do you convert a text string that looks like a date into a real date?

Thx.

What does the text string look like?
January 15, 2008 or 1/15/2008 or Thursday, July 17, 2008, or Nov. 15,
2008, etc.

CDate([FieldName])
will make a date value out of all of the above EXCEPT "Thursday, July
17, 2008"
 
Hm.

I tried that on a form cdate([datefield]) and all I get back is #name?


fredg said:
The table has a text field containing data looking like dates. IOW, date
info was put into a text field.

Now, I want to display on a form that text field, but I what it to be a
real
date so that I can do date ranges using filter by form.

How do you convert a text string that looks like a date into a real date?

Thx.

What does the text string look like?
January 15, 2008 or 1/15/2008 or Thursday, July 17, 2008, or Nov. 15,
2008, etc.

CDate([FieldName])
will make a date value out of all of the above EXCEPT "Thursday, July
17, 2008"
 
Hm.

I tried that on a form cdate([datefield]) and all I get back is #name?

Is the textbox on your form in fact named datefield? If not, use
whatever the textbox containing the text date is actually named.
 
Hm.

I tried that on a form cdate([datefield]) and all I get back is #name?

fredg said:
The table has a text field containing data looking like dates. IOW, date
info was put into a text field.

Now, I want to display on a form that text field, but I what it to be a
real
date so that I can do date ranges using filter by form.

How do you convert a text string that looks like a date into a real date?

Thx.

What does the text string look like?
January 15, 2008 or 1/15/2008 or Thursday, July 17, 2008, or Nov. 15,
2008, etc.

CDate([FieldName])
will make a date value out of all of the above EXCEPT "Thursday, July
17, 2008"

Access will throw an #Name error whenever it cannot find a field
referred to in an expression.

1) Is [DateField] the actual name of your text date field?

2) Did you precede the expression with an = sign?
=CDate([YourActualTextDateFieldName])

3) Is that Text field included in the form's record source?
 
This did not work. :0(

On the form in the field it says, "#Name?"

Using access 2000.

--Bill

fredg said:
The table has a text field containing data looking like dates. IOW, date
info was put into a text field.

Now, I want to display on a form that text field, but I what it to be a
real
date so that I can do date ranges using filter by form.

How do you convert a text string that looks like a date into a real date?

Thx.

What does the text string look like?
January 15, 2008 or 1/15/2008 or Thursday, July 17, 2008, or Nov. 15,
2008, etc.

CDate([FieldName])
will make a date value out of all of the above EXCEPT "Thursday, July
17, 2008"
 
Back
Top