RIAS
asked on
Find how many days remaining
Hello,
How can I find a count for many days remaining for a Sunday in that week .
Example:
Date : 24/09/2019 which is Tuesday
The date on Sunday in that week will be 29/09/2019
So the count is 5
I will be provided with the current date, need to find the remaining days count till Sunday.
Regards
How can I find a count for many days remaining for a Sunday in that week .
Example:
Date : 24/09/2019 which is Tuesday
The date on Sunday in that week will be 29/09/2019
So the count is 5
I will be provided with the current date, need to find the remaining days count till Sunday.
Regards
Logic:
daysremaining = 0
while not dategiven.DayOfWeek = sunday
daysremaiing = daysremaining+1
dategiven = dategiven+1 (day)
end while
daysremaining = 0
while not dategiven.DayOfWeek = sunday
daysremaiing = daysremaining+1
dategiven = dategiven+1 (day)
end while
ASKER CERTIFIED SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Hi Experts,
Thanks for the help.
Misha, thanks will try the code and brb
Thanks for the help.
Misha, thanks will try the code and brb
SOLUTION
membership
This solution is only available to members.
To access this solution, you must be a member of Experts Exchange.
ASKER
Thank you all.
Gustav Brock your code is spot on!!!! Thanks!!
Gustav Brock your code is spot on!!!! Thanks!!
You are welcome!
Open in new window