| |

VerySource

 Forgot password?
 Register
Search
View: 782|Reply: 6

Question about date calculation

[Copy link]

3

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

Post time: 2020-1-13 11:00:02
| Show all posts |Read mode
Know the dates date1 and date2, calculate the difference between n days, and then push n days forward from date1, how much is the day? How can I do that?
Reply

Use magic Report

1

Threads

12

Posts

10.00

Credits

Newbie

Rank: 1

Credits
10.00

 China

Post time: 2020-1-16 14:09:01
| Show all posts
dateadd and datediff functions
Reply

Use magic Report

3

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-16 14:36:01
| Show all posts
Can you write it in detail? ?
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-16 15:00:01
| Show all posts
date1.AddDays (n);
Just
Reply

Use magic Report

3

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-16 16:18:01
| Show all posts
But how to calculate n?
Reply

Use magic Report

0

Threads

3

Posts

3.00

Credits

Newbie

Rank: 1

Credits
3.00

 China

Post time: 2020-1-16 16:45:01
| Show all posts
date1.AddDays (-n);
Just
Reply

Use magic Report

3

Threads

8

Posts

6.00

Credits

Newbie

Rank: 1

Credits
6.00

 China

 Author| Post time: 2020-1-16 17:27:01
| Show all posts
I mean I don't know how to calculate
How many days are difference between date1 and date2
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