转换问题??? dim str_dtime as date str_dtime = 2002-05-15我要得到的结果为是在月份后面加两个月/. 得到为 str_dtime = 2002-07-15请问在vb中怎么实现哦 解决方案 » 免费领取超大流量手机卡,每月29元包185G流量+100分钟通话, 中国电信官方发货 Option ExplicitPrivate Sub Command1_Click() Call MsgBox(Test("2002-07-15"))End SubPrivate Function Test(ByVal strData As String) As String Dim intMonth As Integer, intYear As Integer, intDay As Integer, strResult As String intMonth = Month(CDate(strData)) intYear = Year(CDate(strData)) intDay = Day(CDate(strData)) strResult = IIf(intMonth + 2 > 12, intYear + 1 & "-" & intMonth + 2 - 12 & "-" & intDay, intYear & "-" & intMonth + 2 & "-" & intDay) strResult = Format(strResult, "YYYY-MM-DD") Test = strResultEnd Function vf修改密码!各位谢谢!!!急用! vb里面的top,left,height,width,怎么换算成像素? 【请教】如何在VB中获得Access数据库表中字段的名称? 如何获得本机当前正在运行的SQLSERVER服务器名? jokesmith(胜利电波)来拿分! 弱弱地再问! 如何让已绑定记录集的mshflexgrid把每条记录从第一格就开始显示呀 连接中的问题请大家帮忙分析一下原因,谢谢(在线等待) 本人有个关于注册表的问题?? 用VB写一个调用命令的小东西 但是为什么提示灾难性错误呢? wininet传输文件的路径的问题(改后缀) 79分求SQL语句(不太难)
Call MsgBox(Test("2002-07-15"))
End SubPrivate Function Test(ByVal strData As String) As String
Dim intMonth As Integer, intYear As Integer, intDay As Integer, strResult As String
intMonth = Month(CDate(strData))
intYear = Year(CDate(strData))
intDay = Day(CDate(strData))
strResult = IIf(intMonth + 2 > 12, intYear + 1 & "-" & intMonth + 2 - 12 & "-" & intDay, intYear & "-" & intMonth + 2 & "-" & intDay)
strResult = Format(strResult, "YYYY-MM-DD")
Test = strResult
End Function