年 = Year(Format("Rs.Fields("时间"),"m/d/yy"))
月= MonthYear(Format("Rs.Fields("时间"),"m/d/yy"))
日= DayYear(Format("Rs.Fields("时间"),"m/d/yy"))

解决方案 »

  1.   

    Dim strYear as String
    Dim strMonth as String
    Dim strDay as StringstrYear=Left(Format(Rst!时间,"YYYYMMDD"),4)
    strMonth=Mid(Format(Rst!时间,"YYYYMMDD"),5,2)
    strDay=Mid(Format(Rst!时间,"YYYYMMDD"),2)
      

  2.   

    Dim strYear as String
    Dim strMonth as String
    Dim strDay as StringstrYear=Left(Format(Rst("时间"),"YYYYMMDD"),4)
    strMonth=Mid(Format(Rst("时间"),"YYYYMMDD"),5,2)
    strDay=Right(Format(Rst("时间"),"YYYYMMDD"),2)
      

  3.   

    用YEAR() MONTH()DAY()函数
      

  4.   

    用YEAR() MONTH()DAY()函数
      

  5.   

    dim cyear as string
    dim cmonth as string
    dim cdate as string
    cyear=cstr(year(rs("thedatefieldname"))
    cmonth=cstr(month(rs("thedatefieldname"))
    cdate=cstr(date(rs("thedatefieldname"))
      

  6.   

    date得到当前日期 day(date) month(date) year(date)分别得到年月日