API返回的是时间时VC的Long型

rainfox0010 2003-08-20 09:43:21
请问我应该用什么方法转换成VB的类型?
...全文
48 5 打赏 收藏 转发到动态 举报
写回复
用AI写文章
5 条回复
切换为时间正序
请发表友善的回复…
发表回复
rainfox0010 2003-08-21
  • 打赏
  • 举报
回复
不行呀!
vc用long型表示的时间和systemtime不通用
aiur2000 2003-08-20
  • 打赏
  • 举报
回复
getdate()
now
yijiansong 2003-08-20
  • 打赏
  • 举报
回复
CDATE()
zyl910 2003-08-20
  • 打赏
  • 举报
回复
VC6:Long
VC.Net:Currenty
rainstormmaster 2003-08-20
  • 打赏
  • 举报
回复
Option Explicit

Private Declare Sub GetLocalTime Lib "kernel32" (lpSystemTime As SYSTEMTIME)
Private Type SYSTEMTIME
wYear As Integer
wMonth As Integer
wDayOfWeek As Integer
wDay As Integer
wHour As Integer
wMinute As Integer
wSecond As Integer
wMilliseconds As Integer
End Type
Private Sub Form_Load()
Dim MyTime As SYSTEMTIME
'Set the graphical mode to persistent
Me.AutoRedraw = True
'Get the local time
GetLocalTime MyTime
'Print it to the form
Me.Print "The Local Date is:" & MyTime.wMonth & "-" & MyTime.wDay & "-" & MyTime.wYear
Me.Print "The Local Time is:" & MyTime.wHour & ":" & MyTime.wMinute & ":" & MyTime.wSecond
End Sub

1,486

社区成员

发帖
与我相关
我的任务
社区描述
VB API
社区管理员
  • API
加入社区
  • 近7日
  • 近30日
  • 至今
社区公告
暂无公告

试试用AI创作助手写篇文章吧