Thread Rating:
  • 0 Vote(s) - 0 Average
  • 1
  • 2
  • 3
  • 4
  • 5
How to get next Saturday
#1
Hi,

How to get next saturday and store it in a string variable e.g. 08012005 ?

Thanks a lot for your help !
#2
Code:
Copy      Help
SYSTEMTIME st
GetLocalTime &st
int plus
if(st.wDayOfWeek=6) plus=7 ;;if now is saturday, add 7 days
else plus=6-st.wDayOfWeek ;;else add days left until saturday

DATE d.fromsystemtime(st)
d=d+plus

str s.time(d "%m%d%Y")

out s
#3
Gintaras I definitely agree with your words.


Forum Jump:


Users browsing this thread: 1 Guest(s)