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 bkrike on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Convert query result to Number from Date?

Status
Not open for further replies.

djayam

Technical User
Aug 16, 2005
95
GB
Hi All,

I have a query (Query1) that returns (amongst other things) the day of the week of a particular date ([Query1.DayNumber]):

=Format([Shipdate],"w")

I want to join this query to my Weekday table on [Weekdays.DayNumber] = [Query1.DayNumber] but it seems the result of Query1 is not a number as I get a type mismatch error. How do I convert this in access (again, easy is SQL but...)

Thanks,

Jason
 
=Int(Format([Shipdate],"w"))

Hope This Helps, PH.
Want to get great answers to your Tek-Tips questions? Have a look at FAQ219-2884 or FAQ181-2886
 
The F1 help in Access is crap. I tried so many questions to get this answer!!

Thanks again PHV.
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top