Extract day from date

djl0525

Well-known Member
Joined
Dec 11, 2004
Messages
1,240
I have a date field formatted for long date. 1/10/2005 is a sample entry in this field. It displays as Monday, January 10, 2005. How do I get the day only out of this field so I can have it in a field by itself.

Maybe formatting for long date to get the day is an unneccesary step. Let's say I have 1/10/2005 in a date field. What do I put in the query criteria to get Monday from 1/10/2005? I want to get the day from the date.

And is there a way to do this in Excel too???
 

Excel Facts

How can you turn a range sideways?
Copy the range. Select a blank cell. Right-click, Paste Special, then choose Transpose.
Build an expression in your query:
=Format([YourDate],"dddd")
For Excel, =Text(YourCellRef,"dddd")

Denis
 
Upvote 0
Cool. I'll try it first thing in the morning! Oops, it is morning... Must be time to go to bed.
 
Upvote 0
I put =Format([SES_STARTDT],"dddd") on the criteria row of my query for my date field which is SES_STARTDT. I get "The expression is typed incorrectly, or it is too complex to be evaluated. For example, a numeric expression may contain too many complicated elements. Try simplifying the expression by assigning parts of the expression to variables."

Did I put the expression in the wrong place? I have no experience with the expression builder. Please advise.
 
Upvote 0
You should actually put the expression on the field row. Access should recognize it as an expression then.
 
Upvote 0

Forum statistics

Threads
1,221,841
Messages
6,162,314
Members
451,759
Latest member
damav78

We've detected that you are using an adblocker.

We have a great community of people providing Excel help here, but the hosting costs are enormous. You can help keep this site running by allowing ads on MrExcel.com.
Allow Ads at MrExcel

Which adblocker are you using?

Disable AdBlock

Follow these easy steps to disable AdBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the icon in the browser’s toolbar.
2)Click on the "Pause on this site" option.
Go back

Disable AdBlock Plus

Follow these easy steps to disable AdBlock Plus

1)Click on the icon in the browser’s toolbar.
2)Click on the toggle to disable it for "mrexcel.com".
Go back

Disable uBlock Origin

Follow these easy steps to disable uBlock Origin

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back

Disable uBlock

Follow these easy steps to disable uBlock

1)Click on the icon in the browser’s toolbar.
2)Click on the "Power" button.
3)Click on the "Refresh" button.
Go back
Back
Top