473,396 Members | 1,892 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,396 software developers and data experts.

How to display (print) the day of the week for a date field



Dear reader,

I need to know which day of the week belongs to a date field.

30 June 2005 is Thursday

There is a function Datepart("ww";[Fieldname])

But how can I display the day of the week for a datefield.

Datepart("day";([Fieldname]) comes back with a error.

Thanks for any help.

Kind regards,

Simon van Beek
Nov 13 '05 #1
3 1807
On Thu, 30 Jun 2005 22:54:08 +0200, S. van Beek wrote:
Dear reader,

I need to know which day of the week belongs to a date field.

30 June 2005 is Thursday

There is a function Datepart("ww";[Fieldname])

But how can I display the day of the week for a datefield.

Datepart("day";([Fieldname]) comes back with a error.

Thanks for any help.

Kind regards,

Simon van Beek


Not clear what you want.
Are you wanting to print the word "Thursday"?

=Format([DateField],"mmmm")

Are you wanting to print a 5 (if the date is a Thursday, and the first
day of the week is Sunday).?

=DatePart("w",[DateField])

This information is all available in VBA Help.
--
Fred
Please only reply to this newsgroup.
I do not reply to personal email.
Nov 13 '05 #2

Format$([Fieldname],"ddd")

or

Format$([Fieldname],"dddd")

or

Format$(Weekday([Fieldname]),"dddd")

......

And a few thousand other ways.

S. van Beek wrote:
I need to know which day of the week belongs to a date field.
30 June 2005 is Thursday
There is a function Datepart("ww";[Fieldname])
But how can I display the day of the week for a datefield.
Datepart("day";([Fieldname]) comes back with a error.


Nov 13 '05 #3
On Thu, 30 Jun 2005 22:54:08 +0200, "S. van Beek" <S.******@HCCnet.nl>
wrote:
Dear reader,

I need to know which day of the week belongs to a date field.

30 June 2005 is Thursday

There is a function Datepart("ww";[Fieldname])

But how can I display the day of the week for a datefield.

Datepart("day";([Fieldname]) comes back with a error.


Try Datepart("w",[Fieldname])

This will return a number from 1 to 7. If that number is 1, it is
Sunday, 2, Monday, etc.

See help on "Datepart"

mike

Nov 13 '05 #4

This thread has been closed and replies have been disabled. Please start a new discussion.

Similar topics

1
by: Steve Fitzgerald | last post by:
The below code works greate for displaying a monthly calendar, but I'm trying to modify it so that it only shows a seven day week calendar. What should I do to modify it. <?php function...
4
by: Mark | last post by:
Hi I have been trying to convert the week number to a range of dates that I can use. It should be fairly simple for you guru's out there but for us mere mortals it is beyond our grasp. I know...
14
by: deko | last post by:
This runs, but does not narrow to current week. suggestions appreciated! SELECT lngEid, dtmApptDate, Subject, Appt_ID FROM qry002 WHERE (dtmApptDate BETWEEN DateAdd("d",-weekday()+2,) And...
1
by: Dos Lil | last post by:
I am trying to display the day of date entered by the user.I know I need to use day(date)function.I am trying to write this in the lostfocus event of the field Workdate Can anyone please help ...
3
by: SJM | last post by:
I have a problem that occurs occasionally with a db for a undetermined reason which I would love to solve. I construct and append a series of 7 records to a table using ADO recordset. Each record...
2
by: Simon Pleasants | last post by:
I recently built a database to help keep track of shipments we are bringing into the country. Included in the database are a number of fields with dates for shipment, ETA etc. Each one of these...
14
by: Tina | last post by:
My employer tracks productivity/performance of clinicians (how much they bill) each week, its averages for the month, and the 6 months. These averages are compared to their expected productivity....
9
by: Greg | last post by:
Hi, I have a table with "dates", i'd like to display those dates on a calendar. I've put a calendar in a form, linked to my "date" field, and it works, but only showing one "date" per calendar....
7
by: sheri | last post by:
I have a field called date, the date is in the field like this 70925 (which means Sept. 25, 2007). I have another field called day, it is a text field. How do I write a query to populate the day...
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
1
by: Sonnysonu | last post by:
This is the data of csv file 1 2 3 1 2 3 1 2 3 1 2 3 2 3 2 3 3 the lengths should be different i have to store the data by column-wise with in the specific length. suppose the i have to...
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can...
0
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows...
0
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each...
0
agi2029
by: agi2029 | last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing,...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.