| |

VerySource

 Forgot password?
 Register
Search
View: 685|Reply: 4

Questions about time functions

[Copy link]

8

Threads

19

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-25 13:20:02
| Show all posts |Read mode
One button in one form, one label
I now want to click the button to display the corresponding time in the Label. In fact, I will not use the following functions, please give an example, thank you:
1.Date () function
Now () function
3.Time () function
4, Year (dtDate) function
5.Month (dtDate) function
6.Day (dtDate) function
7.WeekDay (dtDate) function
8.Hour (dtTime) function
Thank you, please give an example as well, you can click the button to display the corresponding content in the Label
Reply

Use magic Report

0

Threads

9

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-2-13 21:30:02
| Show all posts
Private Sub Command1_Click ()
  Label1.Caption = Now
End Sub

If you do n’t use it, write it yourself. No such simple thing can be written. Write one, think of a way later
Reply

Use magic Report

8

Threads

19

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-2-13 23:15:01
| Show all posts
So how do the functions in parentheses work? Thank you!
Reply

Use magic Report

8

Threads

19

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

 Author| Post time: 2020-2-14 07:45:01
| Show all posts
So now these will not be used, thank you, please take a look:
4, Year (dtDate) function
5.Month (dtDate) function
6.Day (dtDate) function
7.WeekDay (dtDate) function
8.Hour (dtTime) function
Reply

Use magic Report

0

Threads

46

Posts

23.00

Credits

Newbie

Rank: 1

Credits
23.00

 China

Post time: 2020-2-15 00:00:01
| Show all posts
What should i say

4, Year (dtDate) function
5.Month (dtDate) function
6.Day (dtDate) function
7.WeekDay (dtDate) function
8.Hour (dtTime) function
 
dim dt as date
dt = now
msgbox Year (dt) 'The year part of the date
msgbox Month (dt) 'the month part of the date
msgbox Day (dt) 'Day part of date
msgbox WeekDay (dt) 'This day is the day of the week, 1 Sunday / ...
msgbox Hour (dt) 'Hour part of the date
Reply

Use magic Report

You have to log in before you can reply Login | Register

Points Rules

Contact us|Archive|Mobile|CopyRight © 2008-2023|verysource.com ( 京ICP备17048824号-1 )

Quick Reply To Top Return to the list