Dateadd syntax help

  • Thread starter Thread starter Jeff Boyce
  • Start date Start date
J

Jeff Boyce

Bill

I seem to recall a DayOfWeek-like function. If you find that one in Access
HELP, then use the Left() function to show the left-most character, would
that do it?
 
DatePart is the function, Jeff.

--

Ken Snell
<MS ACCESS MVP>

Jeff Boyce said:
Bill

I seem to recall a DayOfWeek-like function. If you find that one in
Access
HELP, then use the Left() function to show the left-most character, would
that do it?

--
Good luck

Jeff Boyce
<Access MVP>

Bill said:
Hello All,
I need some guidance with the dateadd function.
I am using the following function as the control source on a report.

=DateAdd("d",1,[startdate]) produces a date.

I would like it to display the 1st letter of the day of the week
instead of the date.

Thanks for your assistance.

Bill
 
Actually, the one I was thinking of is WeekdayName().

Jeff

Ken Snell said:
DatePart is the function, Jeff.

--

Ken Snell
<MS ACCESS MVP>

Jeff Boyce said:
Bill

I seem to recall a DayOfWeek-like function. If you find that one in
Access
HELP, then use the Left() function to show the left-most character, would
that do it?

--
Good luck

Jeff Boyce
<Access MVP>

Bill said:
Hello All,
I need some guidance with the dateadd function.
I am using the following function as the control source on a report.

=DateAdd("d",1,[startdate]) produces a date.

I would like it to display the 1st letter of the day of the week
instead of the date.

Thanks for your assistance.

Bill
 
Hello All,
I need some guidance with the dateadd function.
I am using the following function as the control source on a report.

=DateAdd("d",1,[startdate]) produces a date.

I would like it to display the 1st letter of the day of the week
instead of the date.

Thanks for your assistance.

Bill
 
aha!

--

Ken Snell
<MS ACCESS MVP>

Jeff Boyce said:
Actually, the one I was thinking of is WeekdayName().

Jeff

Ken Snell said:
DatePart is the function, Jeff.

--

Ken Snell
<MS ACCESS MVP>

message
Bill

I seem to recall a DayOfWeek-like function. If you find that one in
Access
HELP, then use the Left() function to show the left-most character, would
that do it?

--
Good luck

Jeff Boyce
<Access MVP>

Hello All,
I need some guidance with the dateadd function.
I am using the following function as the control source on a report.

=DateAdd("d",1,[startdate]) produces a date.

I would like it to display the 1st letter of the day of the week
instead of the date.

Thanks for your assistance.

Bill
 
Jeff, Ken,
Thanks for the quick reply.
This is what I ended up with.
First I formatted the control to give me the date.
=(DateAdd("d",1,[startdate])
Then I formatted the date to get the day
=Format(DateAdd("d",1,[startdate]),"ddd")
This produces Mon for Monday
Then I used the left function to pull the M from the string Mon
=Left(Format(DateAdd("d",1,[startdate]),"ddd"),1)
If you can see any problems with this process, please let me know.
Thanks again.
Bill


Ken Snell said:
DatePart is the function, Jeff.

--

Ken Snell
<MS ACCESS MVP>

Jeff Boyce said:
Bill

I seem to recall a DayOfWeek-like function. If you find that one in
Access
HELP, then use the Left() function to show the left-most character, would
that do it?

--
Good luck

Jeff Boyce
<Access MVP>

Bill said:
Hello All,
I need some guidance with the dateadd function.
I am using the following function as the control source on a report.

=DateAdd("d",1,[startdate]) produces a date.

I would like it to display the 1st letter of the day of the week
instead of the date.

Thanks for your assistance.

Bill
 
Jeff, Ken,
Thanks for the quick reply.
This is what I ended up with.
First I formatted the control to give me the date.
=(DateAdd("d",1,[startdate])
Then I formatted the date to get the day
=Format(DateAdd("d",1,[startdate]),"ddd")
This produces Mon for Monday
Then I used the left function to pull the M from the string Mon
=Left(Format(DateAdd("d",1,[startdate]),"ddd"),1)
If you can see any problems with this process, please let me know.
Thanks again.
Bill
** snipped **

And how will your 1 character day name allow the user to differentiate
between Tuesday and Thursday, or Saturday and Sunday?
 
Hi Fred,
Great question. I did not explain my total intent.
The letters sit on top of labels 1 thru 31
so it will be fairly easy to determine.
But I appreciate your comment.
Thank You.
Bill
fredg said:
Jeff, Ken,
Thanks for the quick reply.
This is what I ended up with.
First I formatted the control to give me the date.
=(DateAdd("d",1,[startdate])
Then I formatted the date to get the day
=Format(DateAdd("d",1,[startdate]),"ddd")
This produces Mon for Monday
Then I used the left function to pull the M from the string Mon
=Left(Format(DateAdd("d",1,[startdate]),"ddd"),1)
If you can see any problems with this process, please let me know.
Thanks again.
Bill
** snipped **

And how will your 1 character day name allow the user to differentiate
between Tuesday and Thursday, or Saturday and Sunday?
 
Your question reminds me of an old joke ---

St. Peter told a man who had just died that he had to answer just one
question to get into heaven. The question was, "How many days of the week
begin with T". With no hesitation the man shouted out "Four". St. Peter
rolled his eyes upward and asked the man, "How did you get Four?". The man
replied, "Tuesday, Thursday, Today and Tomorrow". Would you let the man into
heaven???

Steve
PC Datasheet



fredg said:
Jeff, Ken,
Thanks for the quick reply.
This is what I ended up with.
First I formatted the control to give me the date.
=(DateAdd("d",1,[startdate])
Then I formatted the date to get the day
=Format(DateAdd("d",1,[startdate]),"ddd")
This produces Mon for Monday
Then I used the left function to pull the M from the string Mon
=Left(Format(DateAdd("d",1,[startdate]),"ddd"),1)
If you can see any problems with this process, please let me know.
Thanks again.
Bill
** snipped **

And how will your 1 character day name allow the user to differentiate
between Tuesday and Thursday, or Saturday and Sunday?
 
If he could create a crosstab report

PC Datasheet said:
Your question reminds me of an old joke ---

St. Peter told a man who had just died that he had to answer just one
question to get into heaven. The question was, "How many days of the week
begin with T". With no hesitation the man shouted out "Four". St. Peter
rolled his eyes upward and asked the man, "How did you get Four?". The man
replied, "Tuesday, Thursday, Today and Tomorrow". Would you let the man into
heaven???

Steve
PC Datasheet



fredg said:
Jeff, Ken,
Thanks for the quick reply.
This is what I ended up with.
First I formatted the control to give me the date.
=(DateAdd("d",1,[startdate])
Then I formatted the date to get the day
=Format(DateAdd("d",1,[startdate]),"ddd")
This produces Mon for Monday
Then I used the left function to pull the M from the string Mon
=Left(Format(DateAdd("d",1,[startdate]),"ddd"),1)
If you can see any problems with this process, please let me know.
Thanks again.
Bill
** snipped **

And how will your 1 character day name allow the user to differentiate
between Tuesday and Thursday, or Saturday and Sunday?
 
Back
Top