Set SysFormats, Set("SysFormats")
This command yields the control of the date and time formats from the developer to the end user, a goal we find laudable.
Usage |
SET SYSFORMATS ON | OFF cOnOrOff = SET( "SYSFORMATS" ) |
Help states that when SYSFORMATS is set on, you can use the following SET commands to override the Windows settings: SET CENTURY, SET CURRENCY, SET DATE , SET DECIMALS, SET HOURS, SET MARK TO, SET POINT, and SET SEPARATOR. Well, most work as you'd expect: After you SET SYSFORMATS ON, if you issue a SET command to override a setting, the data displays with the overridden format and the corresponding SET() function returns the overridden value (the one you just set it to). Not so with SET CENTURY and SET MARK. They properly pick up the Windows settings when SYSFORMAT is set ON. However, issuing a SET CENTURY or SET MARK does not override the formatting in SYSFORMATS, but the SYS() function returns a value that claims it does. |
Example |
SET SYSFORMATS ON * In the Control Panel, set the short date to 'M/d/yy' SET CENTURY ON ? SET("CENTURY") && "ON" ? DATE() && Yields a date in MM/DD/YY format. |
See Also |