Label1.Caption = Format(Now(), "yyyy-mm-dd")
Label1.Caption = Format(Now(), "HH:MM:SS")

解决方案 »

  1.   

    VB声明 
    Declare Sub GetSystemTime Lib "kernel32" Alias "GetSystemTime" (lpSystemTime As SYSTEMTIME) 
    说明 
    在一个SYSTEMTIME中载入当前系统时间,这个时间采用的是“协同世界时间”(即UTC,也叫做GMT)格式 
    参数表 
    参数 类型及说明 
    lpSystemTime SYSTEMTIME,随同当前时间载入的结构 Type SYSTEMTIME ' 16 Bytes 
        wYear As Integer
        wMonth As Integer
        wDayOfWeek As Integer
        wDay As Integer
        wHour As Integer
        wMinute As Integer
        wSecond As Integer
        wMilliseconds As Integer
    End Type