Results 1 to 3 of 3
  1. #1
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    i have this var
    DATA_TIPOLOGIA=06/01/2010
    how to subtract one month and have DATA_TIPOLOGIA=06/12/2009
    note:
    DATA_TIPOLOGIA is dimensioned string

  2. #2
    WS Lounge VIP rory's Avatar
    Join Date
    Dec 2000
    Location
    Burwash, East Sussex, United Kingdom
    Posts
    6,280
    Thanks
    3
    Thanked 191 Times in 177 Posts
    For example:
    Code:
    	Dim DATA_TIPOLOGIA As String
    	DATA_TIPOLOGIA = "06/01/2010"
    	DATA_TIPOLOGIA = DateAdd("m", -1, DateValue(DATA_TIPOLOGIA))
    	MsgBox DATA_TIPOLOGIA
    Regards,
    Rory

    Microsoft MVP - Excel

  3. #3
    Gold Lounger
    Join Date
    Jan 2004
    Location
    Italy
    Posts
    3,245
    Thanks
    0
    Thanked 0 Times in 0 Posts
    Quote Originally Posted by rory View Post
    For example:
    Code:
    	Dim DATA_TIPOLOGIA As String
    	DATA_TIPOLOGIA = "06/01/2010"
    	DATA_TIPOLOGIA = DateAdd("m", -1, DateValue(DATA_TIPOLOGIA))
    	MsgBox DATA_TIPOLOGIA
    work! tks.

Posting Permissions

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