Undefined Function Mid in Expression

paulS30berks

Registered User.
Local time
Today, 16:09
Joined
Jul 19, 2005
Messages
116
I have written a statement within a select query that modified the format of a date value:

Date of Birth: IIf([Date_Of_Birth]="00000000","",DateValue(Mid([Date_Of_Birth],7,2) & "/" & Mid([Date_Of_Birth],5,2) & "/" & Mid([Date_Of_Birth],1,4)))

But receive the error:

Undefined Function Mid in Expression

Can anyone help?

thanks
 
What exactly are you attempting to do? Is [Data_of_Birth] a date data type?
 
Sorry Date of Birth is a field name.

format of dates in the table I am extracting from are 00000000 which I am converting to format 00/00/0000.

thanks
 
Would something like the following work:

format([Date_of_Birth],"Short Date")
 
Ken was asking if the Date_Of_Birth is stored as a Date type data or String type.
If it is date then you can just format the output directly.

I would check for missing references as they may cause the error.

In any module Tools>Referencess...

HTH

Peter
 

Users who are viewing this thread

Back
Top Bottom