Set Date and Time to Operacional System

HMG Samples and Enhancements

Moderator: Rathinagiri

User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: Set Date and Time to Operacional System

Post 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...
Attachments
Just Testing...
Just Testing...
F_RM_Push_Date.PNG (45.09 KiB) Viewed 2550 times
M., Ronaldo

By: IMATECH

Imation Tecnologia
User avatar
IMATECH
Posts: 188
Joined: Sun May 27, 2012 9:33 pm
Location: Brazil: Goiânia-GO.

Re: Set Date and Time to Operacional System

Post 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
M., Ronaldo

By: IMATECH

Imation Tecnologia
User avatar
brain
Posts: 26
Joined: Tue Aug 02, 2011 5:01 pm

Re: Set Date and Time to Operacional System

Post 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
Post Reply