SQL Problems (Date)

Results 1 to 3 of 3

Thread: SQL Problems (Date)

  1. #1
    Join Date
    Dec 1969

    Default SQL Problems (Date)

    Having problems with an SQL Function... We have a normal date field, and a text field with a month in it.. based on an entry containing a text month, we need to be able to search for information based on the previous month.. So I need an SQL function that returns the previous month based on the month entered

  2. #2
    Bill H. Guest

    Default RE: SQL Problems (Date)

    dateadd(mm,-1,date)<BR><BR>where date is the date entered...that should return the month prior...actually, 1 month prior exactly...

  3. #3
    Join Date
    Dec 1969

    Default RE: SQL Problems (Date)

    i will just give a idea <BR><BR>first u just display the textbox value, hope u will get the months values form 1 to 12<BR>and then get the records from the table where the condtion maches datefield month.<BR>use the like keyword for the for comparing the month in the date field.<BR><BR>Kittu

Posting Permissions

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