Results 1 to 4 of 4
  1. #1
    Join Date
    Jan 2004
    Location
    Texas
    Posts
    37

    Unanswered: I need to get yesterday's date

    I need to get yesterday's date ... I thought this was how it worked but I guess not since ydate = tomorrow's date

    Private Sub Form_Open()
    Dim ydate As Date
    ydate = DateDiff("d", -1, Now())
    Me.Text13 = ydate

    End Sub

  2. #2
    Join Date
    Apr 2002
    Location
    Toronto, Canada
    Posts
    20,002
    not DateDiff, DateAdd
    rudy.ca | @rudydotca
    Buy my SitePoint book: Simply SQL

  3. #3
    Join Date
    Jan 2004
    Location
    Texas
    Posts
    37
    Doooooh ... thanks

    Must be tired
    A2K - W2k
    Thanks & Regards
    Pete

  4. #4
    Join Date
    Oct 2003
    Location
    Ger
    Posts
    1,969
    Provided Answers: 1
    yDate= Date() -1

Posting Permissions

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