Page 2 of 2

Re: Dating problem! - Help me!

Posted: Tue Jun 02, 2009 10:28 am
by sudip
Hello Rathi,
rathinagiri wrote:Yes, this is the same for my another XP machine too!

So, I think we can utilize the same to find out the user's date format.

Thanks Grigory Filatov for the report.
If possible please send some code regarding how to retrieve date format from Windows Registry in this thread.

(BTW, I don't know how to read registry value from HMG)

TIA.

Regards.

Sudip

Re: Dating problem! - Help me!

Posted: Tue Jun 02, 2009 12:43 pm
by Rathinagiri
Yes. You can see a sample in c:\hmg\samples\registry.

Now, for getting the current date format, we can use the following function.

hb_ValToStr( RegistryRead( "HKEY_CURRENT_USER\Control Panel\International\sShortDate" ) )

Re: Dating problem! - Help me!

Posted: Tue Jun 02, 2009 1:28 pm
by esgici
Hi

Code: Select all

    MsgBox( SET( _SET_DATEFORMAT ) )   // mm/dd/yy
    SET CENT ON
    MsgBox( SET( _SET_DATEFORMAT ) )   // MM/DD/YYYY
    SET DATE ANSI
    MsgBox( SET( _SET_DATEFORMAT ) )   // YYYY.MM.DD
When the only tool you have is a hammer, everything looks like a nail :)


Regards

--

Esgici