如何调用系统年月日
谁可以把代码告诉我

解决方案 »

  1.   

    Dim  MyYear,MyMonth,MyDayMyYear = Year(Date)
    MyDay = Day(Date)
    MyMonth = Month(Date)
      

  2.   

    dim strdate as string
    strdate=year(date) & "年" & month(date) & "月" & day(date) & "日"
    msgbox strdate
      

  3.   

    Date 系统当前日期Year(Date)
    Day(Date)
    Month(Date)
      

  4.   

    字符串=year(date) & "年" & month(date) & "月" & day(date) & "日"
      

  5.   

    dim str as stringstr=time
    msgbox str
    msgbox date
      

  6.   

    dim szDate as string
    dim szYear as string, szMonth as string, szDay as stringszDate=format("YYYY年MM月DD日 HH点NN分SS秒",now)szYear=year(now)
    szMonth=month(now)
    szDay=day(now)
      

  7.   

    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 IntegerEnd TypePublic Declare Sub GetSystemTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)Public Function GetDay() As String    Dim T As SYSTEMTIME
        
        Call GetSystemTime(T)
        
        GetDay = T.wYear & "年" & T.wMonth & "月" & T.wDay & "日"End Function
      

  8.   

    NOW
    就可以吧!年月日时间都有了
    嘿嘿,很省事