PHV is forcing the month and day to be formatted as 2-digit (leading zero) values. Since most scripts rearely deal with years before the year 1000, doing to same thing to force a 4-digit year is usually unnecessary.
He is using the Right() function to take the 2 characters off the end.
So if his month is january the Month() function will return 1 .... so "0" & 1 = "01"
And his month is december the Month() function will return 12 ... so "0" & 12 = "012"
By taking the 2 rightmost character he will always have a two character string.... the leading zero gets chopped off for October, November, & December (010, 011, 012)
This site uses cookies to help personalise content, tailor your experience and to keep you logged in if you register.
By continuing to use this site, you are consenting to our use of cookies.