Results 1 to 3 of 3

Thread: dates of lost 5 days

  1. #1
    Join Date
    Jan 2006
    Posts
    1

    dates of lost 5 days

    hello all,

    for my application i have to take dates those stored in datebase of lost 5 days.

    i tried for that like this

    select LExpiryDate from vehiclesdetails where LExpiryDate>(Date()-5) and LExpiryDate<Date()

    but it is not coming

    if anybody knows please tell me

    thanks in advance

    regards
    vasu

  2. #2
    Join Date
    Feb 2005
    Posts
    18
    Firstly I'd ensure that the apparent date field is actually a Date type (see the design).

    Secondly, use the DateAdd function...

    DateAdd("d","add to",value(+/-))

  3. #3
    Join Date
    Feb 2006
    Posts
    4
    i assume you want data of previous 5 days

    try this if running query in access:
    select LExpiryDate from vehiclesdetails where
    LExpiryDate > #(Dateadd("d", -5 ,date ) #
    and LExpiryDate< #date #

Posting Permissions

  • You may not post new threads
  • You may not post replies
  • You may not post attachments
  • You may not edit your posts
  •