G
Ghena
Hi I have this query
SELECT advanced.codoff, advanced.entro_il,
IIf(InStr([advanced]![entro_il],"/"),DateDiff("\d",([advanced]![entro_il]),Date()),[advanced]![entro_il])
AS Espr1
FROM advanced
WHERE (((advanced.codoff)=261));
the field [advanced]![entro_il] is a text field.
But is possible that it get a date value or a numeric value
Actually I have an erorr in the field of the expression in wich is
present a date value
E.s. 20/03/06
DateDiff("\d",([advanced]![entro_il]),Date())
on the contrary if the field is numeric access display the value
[advanced]![entro_il]
I tryed using the prefix ISdate as below, but it doesn't work.
IIf(InStr([advanced]![entro_il],"/"),DateDiff("\d",(Isdate([advanced]![entro_il])),Date()),[advanced]![entro_il])
Bye...
SELECT advanced.codoff, advanced.entro_il,
IIf(InStr([advanced]![entro_il],"/"),DateDiff("\d",([advanced]![entro_il]),Date()),[advanced]![entro_il])
AS Espr1
FROM advanced
WHERE (((advanced.codoff)=261));
the field [advanced]![entro_il] is a text field.
But is possible that it get a date value or a numeric value
Actually I have an erorr in the field of the expression in wich is
present a date value
E.s. 20/03/06
DateDiff("\d",([advanced]![entro_il]),Date())
on the contrary if the field is numeric access display the value
[advanced]![entro_il]
I tryed using the prefix ISdate as below, but it doesn't work.
IIf(InStr([advanced]![entro_il],"/"),DateDiff("\d",(Isdate([advanced]![entro_il])),Date()),[advanced]![entro_il])
Bye...