Re: Linking date data types in a query

Tech-Archive recommends: Fix windows errors by optimizing your registry



I do not have all the specifics of what you are trying to accomplish,
however, if your goal is to just compare the date portion of two dates
without the time value, you can use the Int function. In date values, the
time is represented by the fractional value of the date. Therefore, to
remove the time component (actually just make it the same for all dates),
just round the date to a whole number. For example:

Int(MyFirstDate) = Int(MySecondDate)

--
David Lloyd
MCSD .NET
http://LemingtonConsulting.com

This response is supplied "as is" without any representations or warranties.


"Parts Maker" <PartsMaker@xxxxxxxxxxxxxxxxxxxxxxxxx> wrote in message
news:A02892BC-5FAA-480B-A170-F8E2E403428B@xxxxxxxxxxxxxxxx
I tried linking date data types in a simple query and it does not seem to
work. The date data types are the same format (short - mm/dd/yyyy). It
seems
like the data type may include the hh:mm:ss that you can't see and unless
you
have the exact value, down to the second, the query will not return what you
are expecting. Let me know if there is a way to get it to work. Thanks
much!


.



Relevant Pages

  • Re: reserved error -1524 access 2007
    ... OT and cod are the same type ... If OT is a query, ... difficult to trace what's going on without details of the field types. ... It might be that JET is getting the data types mixed up. ...
    (microsoft.public.access.queries)
  • Re: Query Too Complex
    ... what data types are in use at each level? ... > the grouping levels, however this is by no means ideal. ... > Do you know of anything I can do to make this report run with the number ... >> how to run the query. ...
    (microsoft.public.access.reports)
  • Re: Selecting records using criteria as arguments for a mathematical operation
    ... Show us your query and the data types of the fields involved. ... error message seems to indicate you're doing something that violates ... In the Totals row of the query builder, have you considered changing the Sales column from GroupBy to Sum? ...
    (comp.databases.ms-access)
  • Re: Two questions: Access and SQL Server/VBA
    ... I have code that loops through the field names on a query and returns ... How is the easiest way to get the data types from the SQL Server ... end database. ... correct data types lengths). ...
    (comp.databases.ms-access)
  • Re: Specified Cast is not Valid
    ... Actually the final query will have about 3 columns returned from the DB. ... >> I have a method that executes a SQL Server stored procedure returning the ... >> int from SQL server I need to find out why I am getting specified cast is ... >> data types vs the sql data types. ...
    (microsoft.public.dotnet.languages.csharp)