Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations SkipVought on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Date gets converted to binary in make table query

Status
Not open for further replies.

nunan

Technical User
Feb 11, 2004
41
0
0
GB
Hi

Can anyone help me please?

I have the following expression in a make table query to return the required date. However, when the date is inserted into the table, the data type becomes binary which means I cannot append it to a field in an existing table which has a DateTime data type.

Ch2: DateDiff("d",[PeriodEnd],[ResEndDate])

I can see from some posts that I may be able to do something with 'PARAMETERS' in the expressions but I can't figure out what to put where.

Thanks in advance for any help.
 
Your expression don't return a date but a number of days.

Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Ah sorry, my mistake!

I have a field in a query who's criteria requests a date:

Between [Enter Start Date:] And [Enter End Date:]


Then I have 2 expressions in the same query which grab the dates entered and insertit them into new fields:

PeriodStart: [Enter Start Date:]
PeriodEnd: [Enter End Date:]

Any ideas please?

Thanks
 
In the SQL view pane add a parameters instruction:
PARAMETERS [Enter Start Date:] DateTime, [Enter End Date:] DateTime;
SELECT ...


Hope This Helps, PH.
FAQ219-2884
FAQ181-2886
 
Thanks PHV, I will try it later
 
That worked perfectly and I learnt something new, thanks!
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top