• Date query showing wrong dates in output (2003)

    Home » Forums » AskWoody support » Productivity software by function » MS Access and database help » Date query showing wrong dates in output (2003)

    Author
    Topic
    #437054

    On running a date query l require dates less than 01/11/06 yet it is showing dates with 2007 on the end, see screenshot.
    How can l get it so only dates less than or equal to 01/11/06 are showing?
    As well as that l would like blanks removed.

    Viewing 0 reply threads
    Author
    Replies
    • #1037935

      Set the criteria in the Renewal Date field to <=#01/11/2006# and that should do the trick (it should remove the blanks as well).

      • #1037937

        Hi,

        I put in <=#01/11/2006# and also l tried #01/11/2006# in the date criteria field and neither worked , i.e blank results.
        What l would like is NULL values not shown and dates before 01/11/06.
        I am having trouble removing NULLS showing dates with 2007 in.

        • #1037938

          Is the field from your table formatted as Date?

          • #1037939

            It is date and time field in Excel but text in Access, l cannot change format in Access as field length in table is > 255. Any suggestions?

          • #1037940

            I cannot change to date format as need to import as all text format , as tried with date format in Excel and did not import correctly

            • #1037941

              Since it is formatted as text, your criteria will not work. Create a calc: DateValue([YourFieldName]) and in the criteria for this field, enter the <=#01/11/2006#.

            • #1037942

              In the query view create a new field

              and type

              Newdate: Format([Date],”dd-mm-yy”) where Date is the name of the field holding the date as a text string. This will convert the string into a date

    Viewing 0 reply threads
    Reply To: Date query showing wrong dates in output (2003)

    You can use BBCodes to format your content.
    Your account can't use all available BBCodes, they will be stripped before saving.

    Your information: