Code: Select all
FormatDate()
Syntax
Text$ = FormatDate(Mask$, Date)
Description
Returns a string representation of the Date, according to the specified Mask$. The Mask$ is a string which tells how the date should be formatted. The Mask$ accepts several reserved tokens:
%yyyy: Will be replaced by the year value, on 4 digits.
%yy: Will be replaced by the year value, on 2 digits.
%mm: Will be replaced by the month value, on 2 digits.
%dd: Will be replaced by the day value, on 2 digits.
Code: Select all
Date$ = FormatDate("%mm/%dd", Date())
If date$="01/01"
MessageRequester("Title", "Happy New Year!", 0)
EndIf
If date$="02/14"
MessageRequester("Title", "Happy Valentines Day!", 0)
EndIf
If date$="03/17"
MessageRequester("Title", "Happy St. Patricks Day!", 0)
EndIf
If date$="07/04"
MessageRequester("Title", "Happy 4th of July!", 0)
EndIf
If date$="11/11"
MessageRequester("Title", "Happy Veterans Day", 0)
EndIf
If date$="12/25"
MessageRequester("Title", "Merry Christmas", 0)
EndIf