Programming Tips and Gotchas (Struts hosting) The validity of

Programming Tips and Gotchas The validity of the date expression, as well as the position of the month element within the date expression, is initially determined by the locale settings of the current Windows system. However, some intelligence has been built into the Month function that surpasses the usual comparison of a date expression to the current locale settings. For example, on a Windows machine set to US date format (mm/dd/yyyy), the date “13/12/1998″ would technically be illegal. However, the Month function returns 12 when passed this date. The basic rule for the Month function is that if the system-defined month element is outside legal bounds (i.e., greater than 12), the system-defined day element is assumed to be the month and is returned by the function. Since the IsDate function adheres to the same rules and assumptions as Month, it can be used to determine whether a date is valid before passing it to the Month function. Visual Basic also has a new MonthName function for returning the name of the month. You can also use the DatePart function. See Also Day Function, Year Function MonthName Function Class Microsoft.VisualBasic.DateAndTime Syntax MonthName month [, abbreviate] month Use: Required Data Type: Integer The ordinal number of the month, from 1 to 12 abbreviate Use: Optional Data Type: Boolean A flag to indicate if an abbreviated month name should be returned Return Value String containing the name of the specified month Description
Hint: If you are looking for good and high quality web space to host and run your java application check Vision java web hosting services

Comments are closed.