For example, using getting a datetime as a string requires two lines of code:
dim now as new Date
MsgBox( "At the tone the time will be: " + now.SQLDateTime )
For convenience, to collapse those multiple lines of code, add these two little methods to your App class, or some other utility class.
Function now() As Date
dim thisMoment as new Date
return thisMoment
End Function
and
Function nowSQLDateTime() As String
dim thisMoment as new Date
return thisMoment.SQLDateTime
End Function
Now you can make get the datetime mid-line:
MsgBox( "At the tone the time will be: " + app.nowSQLDateTime )
No comments:
Post a Comment