| | |
maskedbox
![]() |
To calculate after 30 days you can use DateAdd() function
Example
Draw two MaskEdit Controls and One Command Button
Example
Draw two MaskEdit Controls and One Command Button
VB Syntax (Toggle Plain Text)
Private Sub Command1_Click() Dim FormatDate As String Dim DateAfter30Days As Date DateAfter30Days = CDate(MaskEdBox1.Text) DateAfter30Days = DateAdd("d", 30, DateAfter30Days) FormatDate = Format(DateAfter30Days, "dd/MM/yy") MaskEdBox2.Text = FormatDate End Sub Private Sub Form_Load() MaskEdBox1.Mask = "##/##/##" MaskEdBox2.Mask = "##/##/##" MaskEdBox1.Text = Format(Date, "dd/MM/yy") End Sub
KSG
selvaganapathy was given great code...
also you can try use DateSerial()
DateSerial(Year,Month,Day)
This will add 20 days from 5 July 2008.
Result : 7/25/2008
This will count the 50 days from 1 July 2008.
Result : 8/19/2008
also you can try use DateSerial()
DateSerial(Year,Month,Day)
This will add 20 days from 5 July 2008.
vb Syntax (Toggle Plain Text)
Private Sub Form_Load() MsgBox DateSerial(2008, 7, 5 + 20) End Sub
This will count the 50 days from 1 July 2008.
vb Syntax (Toggle Plain Text)
Private Sub Form_Load() MsgBox DateSerial(2008, 7, 50) End Sub
Last edited by Jx_Man; Jul 5th, 2008 at 12:21 am.
Never tried = Never Know
So, Please do something before post your thread.
* PM Asking will be ignored *
So, Please do something before post your thread.
* PM Asking will be ignored *
![]() |
Other Threads in the Visual Basic 4 / 5 / 6 Forum
- Previous Thread: Retrieving data from .CSV file and displaying it in ListView Help!!!
- Next Thread: timer in VB?
| Thread Tools | Search this Thread |
* 6 2007 access activex add age basic beginner birth bmp calculator cd cells.find click client code college connection connectionproblemusingvb6usingoledb creat ctrl+f data database datareport date delete dissertations dissertationthesis dissertationtopic edit excel excelmacro file filename form header iamthwee image inboxinvb internetfiledownload listbox listview liveperson login looping microsoft movingranges number objectinsert open oracle password prime program prompt range-objects readfile reading remotesqlserverdatabase report save search sendbyte sites sql sql2008 sqlserver subroutine tags time urldownloadtofile vb vb6 vb6.0 vba visual visualbasic visualbasic6 web windows






