Page 4 of 4

Re: Set Date and Time to Operacional System

Posted: Mon Jun 18, 2012 1:19 pm
by IMATECH
Hi brain !

Thanks for report :)

I Have Tryed with your sample: But my result is correct: Just one month added

DTOS( F_RM_Push_Date( STOD( '20120131' ), 0, 1, 0 ) )
RESULT := '20120229'

DTOS( F_RM_Push_Date( STOD( '20121231' ), 0, 1, 0 ) )
RESULT := '20130131'

...

I have maked some changes in the function to be safe from locale date settings ;)
May solve this error (new code edited in my last message : before this post)...


Best regards...

Re: Set Date and Time to Operacional System

Posted: Wed Jun 20, 2012 3:29 am
by IMATECH
Hi brain !

Thanks again for report :)

Code: Select all


Tnx for your immediate response. Yeah! that output is right. I rechecked it again. It was my fault. How about this one.

F_Push_Date( CTOD('01/30/2012'), 0, 1, 0 ) => Result 03/01/2012 instead of 02/29/2012
F_Push_Date( CTOD('01/30/2012'), 0, 1, 0 ) => Result 03/02/2012 instead of 02/29/2012

Tnx a lot again.


Tested: and found no any problem...

F_RM_Push_Date( STOD( '20120130' ), 0, 1, 0 ) == STOD( '20120229' )

But I have a new release for function: Check if initial date have the Last Day of the month...

Function Updated Again...

Less code... better use...


Thank's for reporting possible error's

Re: Set Date and Time to Operacional System

Posted: Mon Jun 25, 2012 8:59 pm
by brain
Good day. Is there anyone of you can share how to change date and time by using
CallDll32() functions? Tnx and more power.

CallDll32('SetSystemTime', 'Kernel32.dll') what will the syntax for this function? tnx