S
SAC
I'm using 2003.
I have a control on a form that I'd like to end up with a date formatted as
YYMMDD.
I currently use this function in the oncurrent event of the form:
Function fLastDayOfMonth()
Dim strmonth As String
Dim strDay As String
Dim strYear As String
Dim dteLastDayOfMonth As Date
strmonth = DLookup("BillingMo", "tblSystem") + 1
strYear = DLookup("BillingYr", "tblSystem")
dteLastDayOfMonth = strmonth & "/" & "01" & "/" & strYear
dteLastDayOfMonth = dteLastDayOfMonth - 1
End Function
At the end of this function, dteLastDayOfMonth is right, 6/30/2009. Now I'd
like to convert it to 090630 with each part having 2 digits.
Thanks for your help.
I have a control on a form that I'd like to end up with a date formatted as
YYMMDD.
I currently use this function in the oncurrent event of the form:
Function fLastDayOfMonth()
Dim strmonth As String
Dim strDay As String
Dim strYear As String
Dim dteLastDayOfMonth As Date
strmonth = DLookup("BillingMo", "tblSystem") + 1
strYear = DLookup("BillingYr", "tblSystem")
dteLastDayOfMonth = strmonth & "/" & "01" & "/" & strYear
dteLastDayOfMonth = dteLastDayOfMonth - 1
End Function
At the end of this function, dteLastDayOfMonth is right, 6/30/2009. Now I'd
like to convert it to 090630 with each part having 2 digits.
Thanks for your help.