Results 1 to 2 of 2

Thread: DATES - HELP !!!

  1. #1
    Join Date
    Dec 1969

    Default DATES - HELP !!!

    What is the best way of putting dates into and access table, i am wanting to compare the date in the table with the current date and dont want to have a huge sql to do it to allow for year changes etc. Are there any functions or can i use date1<date2 but i thought i saw somewhere that the date has to have some character at the start and end,was it # ???

  2. #2
    Join Date
    Dec 1969

    Default RE: DATES - HELP !!!

    The following code snippet will generate the SQL stmnt to pull all records for myTable where StartDate is greater than 7 days ago.<BR><BR>myDate = FormatDateTime((DateAdd("y",-7,Now())),2)<BR>SQLqry= "SELECT * FROM myTable WHERE ((StartDate)&#062; " & "#" & myDate & "#) ORDER BY StartDate DESC;"<BR><BR>Hope this helps... Cheers!

Posting Permissions

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