Jim,
I would choose maybe neither if the [Date] is a datetime data type. It looks like this query simply strips any time portion off the [Date] field which can better be performed with:
Sent: Wednesday, October 18, 2017 2:08 PM
To: Liz Ravenwood liz_ravenwood@beaerospace.com [MS_Access_Professionals]
Subject: Re: RE: [MS_AccessPros] Format and trim question in a query
I vote you take off the "left" one and see if anyone bawls.
;-) They look like the same to me.
Respectfully,
[RCEmailSigLogo]
Liz Ravenwood
Software Engineer
Interior Systems
(520) 239-4808
Liz_ravenwood@beaerospace.com<mailto:Liz_ravenwood@beaerospace.com>
rockwellcollins.com<http://www.rockwellcollins.com/>
From: MS_Access_Professionals@yahoogroups.com [mailto:MS_Access_Professionals@yahoogroups.com]
Sent: Wednesday, October 18, 2017 11:12 AM
To: MS_Access_Professionals@yahoogroups.com
Subject: [MS_AccessPros] Format and trim question in a query
Hello all,
I am working on a database someone else built. there is a macro that runs a series of queries and then opens a report. But there are 2 queries that seem to be redundant.
The macro runs an import for an excel file into the database. But the next 2 queries do the following.
are these not the same thing????
In the excel it looks like this
2017-09-25 00:00:00.0
qry_TrimDateFieldExemptHrs
SQL
UPDATE laborhours SET laborhours.[Date] = Left([Date],10);
qry_FormatDateExemptHrs
SQL
UPDATE laborhours SET laborhours.[Date] = Format([Date],"mm/dd/yyyy");
Thank You
Jim Wagner
This email (and all attachments) is for the sole use of the intended recipient(s) and may contain privileged and/or proprietary information. Any unauthorized review, use, disclosure or distribution is prohibited. If you are not the intended recipient, please contact the sender by reply e-mail and destroy all copies of the original message.
[Non-text portions of this message have been removed]
Posted by: Duane Hookom <duanehookom@hotmail.com>
Reply via web post | • | Reply to sender | • | Reply to group | • | Start a New Topic | • | Messages in this topic (5) |
Tidak ada komentar:
Posting Komentar