Results 1 to 3 of 3

Thread: How to get the Last Date inf Access Field

  1. #1

    Thread Starter
    Member
    Join Date
    Oct 2011
    Posts
    60

    How to get the Last Date inf Access Field

    Hello Genius ...!!!
    i have database file with updating regularly,
    the database field is PurchaseDate which has for stored the product purchasing dates. now what i want, i want to get the buyer like 'timple' last purchasing date

    so i use this below query but 'lastdate' i don't know which keyword is helping to getting LastDate

    Code:
     Select  lastdate From productsSale Where custname = 'timple'
    ==========================
    Database : Ms Access [mdb file], OleDb
    PurchaseField : Date/Time
    ==========================

    Thanks ....

  2. #2
    Super Moderator si_the_geek's Avatar
    Join Date
    Jul 2002
    Location
    Bristol, UK
    Posts
    41,974

    Re: How to get the Last Date inf Access Field

    Thread moved to the 'Database Development' forum - which is where you should always post SQL questions (while SQL can be used in VB.Net, it is certainly not specific to VB.Net)


    To get the highest value of a field (unless it is text/char based), use the Max function, eg:
    Code:
    Select Max(PurchaseDate) as lastdate From productsSale Where custname = 'timple'

  3. #3

    Thread Starter
    Member
    Join Date
    Oct 2011
    Posts
    60

    Re: How to get the Last Date inf Access Field

    ooh thanks Genius sorry for wrong place post .... k i'll try it and reply soon ...thanks

Tags for this Thread

Posting Permissions

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



Click Here to Expand Forum to Full Width