Ordering by Date

Results 1 to 2 of 2

Thread: Ordering by Date

  1. #1
    Fion Guest

    Default Ordering by Date

    I wish to retrieve records and display them ordered by "purchaseDate" a Date/Time data type in Access table. But my statement does not seem to work. <BR><BR>Please take a look and advise:<BR><BR>function GetPurchase<BR>dim sql,rs<BR>set rs = Server.CreateObject("ADODB.RecordSet")<BR> <BR>sql = "Select o_id as ""Purchase id"",purchaseDate as ""Date Initiated"", p_title as ""Project title"",totalAmt as ""Total Amount"", status as ""Current Status"" from purchase where staff_id = &#039"+user+"&#039 order by purchaseDate"<BR>rs.open sql,dbConn<BR>set GetPurchase = rs<BR>end function<BR><BR>Thanks.<BR>

  2. #2
    Join Date
    Dec 1969

    Default RE: Ordering by Date

    I really don&#039t see anything wrong. I suggest that you open your access table in access and use the query designer. Create a new query using the wizzard. You might need to go into sql view to get it like you want but see if it shows you the table data in the correct order. Also Microsoft Visual Interdev also has a query designer.<BR>Hope this helps!

Posting Permissions

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