VB time problem, VB date function calculation

Updated on educate 2024-02-09
9 answers
  1. Anonymous users2024-02-05

    The decimal part of the date variable with a value of less than 1 corresponds to the time of day from 0:00:00 to 24:00:00

    Equivalent to 12:00:00

    Equivalent to hours, hours are 24 minutes, so it is equivalent to 14:24:00

    1 hour 60 minutes.

    Let the decimal value less than 1 be a

    24 * a

    The integer part of the result is the hour.

    The decimal part * 60

    The integer part of this result is the minute.

    The decimal part * 60

    The integer part of this result is the second.

    You'll find out if you try it yourself.

  2. Anonymous users2024-02-04

    Change a or b to a number greater than 1, and you will find that in fact, the value of a or b is the number of days calculated from 0:00:00 on January 1, 1900, the decimal part is *24 hours, and the minutes and seconds are the same, if it is less than 1 day, only hours and minutes and seconds are displayed, and if it is greater than one day, only the year, month and day are displayed.

  3. Anonymous users2024-02-03

    The 3rd floor is correct.

    If you try it, it's 2 hours and 24 minutes, and it's 14 minutes and 24 seconds.

  4. Anonymous users2024-02-02

    Use 24 hours* to get the hour, and the hour is 14

    Hour 24 minutes is converted into time format 14:24:00

    Using 24 hours* to get 12 hours is 12:00:00

  5. Anonymous users2024-02-01

    That is, we define the data type of a b as time, and divide 1 into 24 hours.

  6. Anonymous users2024-01-31

    month is the month in which the date is found, so the first result is 5

    day is the day on which the date is found, so the second result is 16

    So the result is 21

  7. Anonymous users2024-01-30

    Month (5) of the first term + day (16) of the second term = 21

  8. Anonymous users2024-01-29

    2003 Zaobi 11 22 -40 is equivalent to 2003 November 22 pushed forward 40 days, that is, October 13, 2003.

    month( -40) is to find month(

    So the resulting value is 10

  9. Anonymous users2024-01-28

    month(##

    is the month of the calculation date (2003-11 or 22-40).

    This is how it works in the program. First of all. ##

    It will be converted into a standard form of annihilation. And then.

    Compute. Date. ##

    This corresponds to 22 November 2003, which is 40 days forward, i.e. 13 October 2003.

    Date obtained.

    Finally, the month function is used.

    calculates the month of , so the result is 10

Related questions
4 answers2024-02-09

Create a new project with two forms: form1, form2

There are two controls on form1: command button command1 and timer1There are two controls on form2: label label1 and timer1 click the command button when the program is running, the command button disappears, wait for 1 second and then pop up form 2 display: >>>More

6 answers2024-02-09

The second line declares that the textbox control array ** is wrong and does not conform to the syntax specification! >>>More

5 answers2024-02-09

Try my way:

Create a text on the form, and a command1 >>>More

13 answers2024-02-09

Find a way to deal with it:

Check whether the filename is an empty string, if it is, do not perform the following operations. >>>More

5 answers2024-02-09

Most of the decimal places in VB are attributes, such as: >>>More