VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



'simple one line code for adding a date or month or year

by Sreeram.P (16 Submissions)
Category: Custom Controls/Forms/Menus
Compatability: Visual Basic 5.0
Difficulty: Unknown Difficulty
Originally Published: Fri 9th June 2006
Date Added: Mon 8th February 2021
Rating: (1 Votes)

'simple one line code for adding a date or month or year

Rate 'simple one line code for adding a date or month or year



    Text1.Text = DateAdd("d", 1, Format(Date, "mm/dd/yyyy"))
    
    'for adding a month in place of 1 how many months you want you can...add
    Text1.Text = DateAdd("m", 1, Format(Date, "mm/dd/yyyy"))
    
    'for adding a year in place of 1 how many years you want you can...add
    Text1.Text = DateAdd("yyyy", 1, Format(Date, "mm/dd/yyyy"))


Download this snippet    Add to My Saved Code

'simple one line code for adding a date or month or year Comments

No comments have been posted about 'simple one line code for adding a date or month or year. Why not be the first to post a comment about 'simple one line code for adding a date or month or year.

Post your comment

Subject:
Message:
0/1000 characters