This topic has been archived. It cannot be replied.
-
工作学习 / IT杂谈 / 用VB6的DXJM请——》在VB6中就一个command,点后运行如下:
Private Sub Command1_Click()
Dim dd As Long
Dim date1 As Date
Dim date2 As String
date2 = Format(Now, "yy-mm-dd hh:mm:dd AMPM")
MsgBox date2
Print date2
Print
dd = 0
dd = Now
Print Now
Print dd
Print
Print Format(dd, "yy-mm-dd hh:mm:dd AMPM")
date2 = Format(dd, "yy-mm-dd hh:mm:dd AMPM")
MsgBox date2
date1 = Format(dd, "yy-mm-dd")
Print date1
End Sub
dd是不是今天的日期,偶在公司用date--long--date可以恢复日期,在家里居然要多一天。
-henhen(哼哼, PtoPing);
2002-12-5
{501}
(#896538@0)
-
有没有朋友帮偶试过呀?谢谢。
-henhen(哼哼, PtoPing);
2002-12-5
(#896563@0)
-
日期不是整型,被转化为整型后当然不对
-miketany(MIKE老狼);
2002-12-5
(#896653@0)
-
谢谢,偶公司原来的东东就是这样怪,害我今天搞一下午,又不能改掉。你的sql考了吗?
-henhen(哼哼, PtoPing);
2002-12-5
(#896656@0)
-
use DOUBLE, I had several function about date calculations, all use double as internal var.
-mikesxf(家里家外忙前忙后ing.);
2002-12-6
(#896956@0)