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)
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)
用YEAR() MONTH()DAY()函数
用YEAR() MONTH()DAY()函数
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"))
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)
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)
dim cmonth as string
dim cdate as string
cyear=cstr(year(rs("thedatefieldname"))
cmonth=cstr(month(rs("thedatefieldname"))
cdate=cstr(date(rs("thedatefieldname"))