|
-
Aug 19th, 2008, 09:20 PM
#1
Thread Starter
New Member
How to Get the Date(Moday - Sunday) Info
Hi,
Code:
Any solution given if i would like to get next week "moday- sunday".
For Example :
Today is 08/08/2008 - wednesday
Next Week 24/08/2008 - Moday
----------------------------------------------------
Mon(24/08/2008)| Tue(25/08/2008)| Wed(26/08/2008)|
-----------------------------------------------------
thanks for any reply.
VbForum ... is the best for vb...
-
Aug 20th, 2008, 03:29 AM
#2
Re: How to Get the Date(Moday - Sunday) Info
Is this what you want?
Code:
Sub DayWeekName()
'This will give you Wednesday
MsgBox Format(#8/20/2008#, "dddd")
End Sub
A good exercise for the Heart is to bend down and help another up...
Please Mark your Thread " Resolved", if the query is solved
MyGear:
★ CPU ★ Ryzen 5 5800X
★ GPU ★ NVIDIA GeForce RTX 3080 TI Founder Edition
★ RAM ★ G. Skill Trident Z RGB 32GB 3600MHz
★ MB ★ ASUS TUF GAMING X570 (WI-FI) ATX Gaming
★ Storage ★ SSD SB-ROCKET-1TB + SEAGATE 2TB Barracuda IHD
★ Cooling ★ NOCTUA NH-D15 CHROMAX BLACK 140mm + 10 of Noctua NF-F12 PWM
★ PSU ★ ANTEC HCG-1000-EXTREME 1000 Watt 80 Plus Gold Fully Modular PSU
★ Case ★ LIAN LI PC-O11 DYNAMIC XL ROG (BLACK) (G99.O11DXL-X)
★ Monitor ★ LG Ultragear 27" 240Hz Gaming Monitor
★ Keyboard ★ TVS Electronics Gold Keyboard
★ Mouse ★ Logitech G502 Hero
-
Aug 20th, 2008, 03:47 AM
#3
Re: How to Get the Date(Moday - Sunday) Info
If this is an exercise then I'll give narrative requirements spec so there's effort on your part and you learn.
If your no longer a student or already a professional, then I'll still give you narrative requirement as you should already know how to read such by now.
If you add 7 then you will get same day next week... so you need to subtract x number of days to reset date to target start date (monday)... to know how many days to subtract you need to get ordinal position (1-7) of given date... you can use WeekDay() function for this with start of week specified... simple arithmetic would then yield date of target start date (monday)... you would then just loop 7 times to get the dates from target start date (monday) to sunday.
-
Aug 20th, 2008, 04:46 AM
#4
Re: How to Get the Date(Moday - Sunday) Info
A good lecturer, leinad.
I intended to give him the code but let him try first.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|