Windows API Calls for Powerbuilder 5.0

¹®Á¦

GetSystemTime( )

ÇØ°á

This function returns the system time into a structure by reference. There is no Powerbuilder equivalent.

Global External Function:
SUBROUTINE GetSystemTime(ref systemtime systimeptr) Library "Kernel32.dll"

Structure: (SystemTime)
uint year, uint month, uint dayofweek, uint day, uint hour, uint minute, uint second,
uint millisecond

Script:
systemtime s_systime
string l_day, l_date, l_time
GetSystemTime(s_systime)
l_date = string(s_systime.month) +"/"+ string(s_systime.day) &
           +"/"+ string(s_systime.year)
l_time = string(s_systime.hour) +":"+ string(s_systime.minute) &
           +":"+ string(s_systime.second) +":"+ string(s_systime.millisecond)
CHOOSE CASE s_systime.dayofweek
        CASE 1
                l_day = "Sunday"
        CASE 2
                l_day = "Monday"
        CASE 3
                l_day = "Tuesday"
        CASE 4
                l_day = "Wednesday"
        CASE 5
                l_day = "Thursday"
        CASE 6
                l_day = "Friday"
        CASE 7
                l_day = "Saturday"

END CHOOSE
Messagebox("System Time:",l_date + " " + l_day + " " + l_time)

 

ÂüÁ¶