level 7
比如取得now()的日期部分,2024-12-17。竟然没找到这样的函数。
2024年12月17日 01点12分
1
level 11
datepart自己拼接一下
Dim currentDate As Date = Now
Dim year As Integer = DatePart("yyyy", currentDate)
Dim month As Integer = DatePart("m", currentDate)
Dim day As Integer = DatePart("d", currentDate)
Console.WriteLine( year & "-" & month & "-" & day)
2024年12月17日 05点12分
3
level 12
我记得 date()不就是日期部分嘛。time()是时间部分 now是日期时间
2024年12月18日 05点12分
5
楼主的意思应该是给定任意一个日期时间,取出它的日期部分,Now只是个例子
2024年12月18日 05点12分
level 1
Text1.Text = Minute(Time)
Text2.Text = Hour(Time)
Text3.Text = Second(Time)
Text4.Text = Year(Date)
Text5.Text = Month(Date)
Text6.Text = Day(Date)
2025年08月21日 13点08分
7