VBcoders Guest



Don't have an account yet? Register
 


Forgot Password?



format a date to MM-DD-YYYY when entering any date in a texbox.

by Brandon (46 Submissions)
Category: Miscellaneous
Compatability: VB 6.0
Difficulty: Unknown Difficulty
Originally Published: Tue 10th July 2001
Date Added: Mon 8th February 2021
Rating: (1 Votes)

format a date to "MM-DD-YYYY" when entering any date in a texbox.

Rate format a date to MM-DD-YYYY when entering any date in a texbox.



'use one command button, call it cmdFormatDate
Private Sub cmdFormatDate_Click()
'format date
txtDate.Text = Format(txtDate.Text, "MM-DD-YYYY", vbSunday, vbFirstJan1)
End Sub


Download this snippet    Add to My Saved Code

format a date to MM-DD-YYYY when entering any date in a texbox. Comments

No comments have been posted about format a date to MM-DD-YYYY when entering any date in a texbox.. Why not be the first to post a comment about format a date to MM-DD-YYYY when entering any date in a texbox..

Post your comment

Subject:
Message:
0/1000 characters