Site hosted by Angelfire.com: Build your free website today!

Get and Set the Shortdate in Regional Settings using API calls

To get the current format use the following command:

RegistryGet("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", ls_shortdate)

ls_shortdate would hold the format of your short date settings.

This method can be used to check the longdate also by replacing sShortdate with Slongdate.

To set the format so it is compliant with your settings:

RegistrySet("HKEY_CURRENT_USER\Control Panel\International", "sShortDate", "dd/MM/yyyy")

The format dd/MM/yyyy short be change for use in the US to MM/dd/yyyy

This method can be used to set the longdate also by replacing sShortdate with Slongdate and using the right format.

Olusola Osinoiki

Return to Powerbuilder Solutions Homepage