Results 1 to 3 of 3

Thread: VB for Dates

  1. #1
    Join Date
    Aug 2003
    Posts
    39

    Unanswered: VB for Dates

    Can anyone help me with specifying a calculated date in a text box. I just want last months month and year to be displayed in a text box. I think it is something like:

    Month(Date) & Year(Date) but it doesn't seem to be working.

    Any help would be most appreciated.

    Thanks!

  2. #2
    Join Date
    Jul 2003
    Location
    Italy
    Posts
    139
    Just put this in the datasource:

    =DateSerial(Year(Date());Month(Date());1)

    It will show (for today) 01/08/03.

    Then change the format to:

    mmmm/yyyy

    and you're done.
    Marco
    ---Do not send e-mail---
    "New Big Bang Theory: God said unzip universe"

  3. #3
    Join Date
    Dec 2002
    Location
    Préverenges, Switzerland
    Posts
    3,740
    if you really mean "last months month and year ", then try the following ugly expression:

    =Format(DateAdd("m", -1, Date()), "mmm yyyy")

    izy

Posting Permissions

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