date() option

Vo0do0uk

Registered User.
Local time
Today, 09:46
Joined
Apr 24, 2004
Messages
32
i'd like to show in a text box on a form the date for the next monday available

so say today is 7/7/05 id like it to work out the next monday which is 10/7/05 and put this date into the text box?!

any ideas??
 
=Date()-Weekday(Date(),0)+8
 
That doesn't seem to work :confused:

do i need to change it or is that just what i need to enter for the source?
 
Put it in the Control Source of a text box
 
Yeah as soon as i sent it i worked out prob! needed to save form for it to take effect!

works a treat!

how does it work though? just so i know and i've not just copied it off ya
 
For example:

how could i modify it to show the sunday after the monday?

so i'd have next monday date: 10/07/04

next sunday date 17/07/04
 
Sorted that

just took the text box with the code in, made another text box

found number of first text box eg text17 and used this code:

=[Text17]+7

voila! :D
 
Vo0do0uk said:
so i'd have next monday date: 10/07/04

next sunday date 17/07/04

That's some time difference from where I am!
:D
 
Date functions:

The current month:
DateSerial(Year(Date()), Month(Date()), 1)

The next month:
DateSerial(Year(Date()), Month(Date()) + 1, 1)

The last day of the current month:
DateSerial(Year(Date()), Month(Date()) + 1, 0)

The last day of the next month:
DateSerial(Year(Date()), Month(Date()) + 2, 0)

The first day of the previous month:
DateSerial(Year(Date()), Month(Date())-1,1)

The last day of the previous month:
DateSerial(Year(Date()), Month(Date()),0)

The first day of the current quarter:
DateSerial(Year(Date()), Int((Month(Date()) - 1) / 3) * 3 + 1, 1)

The last day of the current quarter:
DateSerial(Year(Date()), Int((Month(Date()) - 1) / 3) * 3 + 4, 0)

The first day of the current week (assuming Sunday = day 1):
Date() - WeekDay(Date()) + 1

The last day of the current week:
Date() - WeekDay(Date()) + 7

The first day of the current week (using settings in Options dialog box):
Date() - WeekDay(Date(), 0) + 1

The last day of the current week:
Date() - WeekDay(Date(), 0) + 7
 

Users who are viewing this thread

Back
Top Bottom