Link to home
Create AccountLog in
Microsoft Access

Microsoft Access

--

Questions

--

Followers

Top Experts

Avatar of Hiroyuki Tamura
Hiroyuki TamuraπŸ‡ΊπŸ‡Έ

Microsoft Access Date format
i have a expression but when i create other query, i get this error.
would you advise me?
User generated imageUser generated image

Zero AI Policy

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Shaun KlineShaun KlineπŸ‡ΊπŸ‡Έ

Best guess without seeing the data types for tblDate is that the Date field is a date/time data type, but your query (view) is returning a string (this is the return data type of the format function) which causes the issue when you attempt to join the two.

1. Date is a reserved word and should not be used for a name
http://allenbrowne.com/AppIssueBadWord.html

2. Date is stored internally as a double-precision number (exponential format -- 1.23 x 10^^n) and is, therefore, not accurate for exact comparisons (including linking)

3. Dates can also have a time component so they are not whole numbers

4. please paste in your equation because the screenshot does not show it all

5. names for calculated fields CANNOT be the same as a name in any source (ie: Date -- already a bad name anyway, as mentioned above)

6. using the FORMAT function converts values to a string (text) -- instead, use the format PROPERTY (right-click in a column and set Format on the Property Sheet)

In a Join ... the Data Types must be EXACTLY the same .... check that.

Reward 1Reward 2Reward 3Reward 4Reward 5Reward 6

EARN REWARDS FOR ASKING, ANSWERING, AND MORE.

Earn free swag for participating on the platform.


Avatar of Hiroyuki TamuraHiroyuki TamuraπŸ‡ΊπŸ‡Έ

ASKER

Data Type looks same but expression might be causing the error.
User generated imageUser generated image

Avatar of Shaun KlineShaun KlineπŸ‡ΊπŸ‡Έ

Even though the two fields may look the same, because the Date column in your WorkHour query is a string (text) data type, it cannot be used when joining to a Date/Time data type.

If you are using the format to remove the time component of the date/time, replace it with DateValue([Start Time])

"Data Type looks same but expression might be causing the error."
You need to open table in Design view ....

Free T-shirt

Get a FREE t-shirt when you ask your first question.

We believe in human intelligence. Our moderation policy strictly prohibits the use of LLM content in our Q&A threads.


Avatar of Hiroyuki TamuraHiroyuki TamuraπŸ‡ΊπŸ‡Έ

ASKER

i'm getting mismatch error from this expression;
Date: DateValue(Format([Start Time],"yyyy/mm/dd"))

SOLUTION
Avatar of Shaun KlineShaun KlineπŸ‡ΊπŸ‡Έ

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Create Account

Avatar of Hiroyuki TamuraHiroyuki TamuraπŸ‡ΊπŸ‡Έ

ASKER

getting error
User generated image

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Avatar of PatHartmanPatHartmanπŸ‡ΊπŸ‡Έ

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Avatar of Nick67Nick67πŸ‡¨πŸ‡¦

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

ASKER CERTIFIED SOLUTION
Avatar of Gustav BrockGustav BrockπŸ‡©πŸ‡°

Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.

SOLUTION
Link to home
membership
Log in or create a free account to see answer.
Signing up is free and takes 30 seconds. No credit card required.
Microsoft Access

Microsoft Access

--

Questions

--

Followers

Top Experts

Microsoft Access is a rapid application development (RAD) relational database tool. Access can be used for both desktop and web-based applications, and uses VBA (Visual Basic for Applications) as its coding language.