A Microsoft Office (Excel, Word) forum. OfficeFrustration

If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Running & Setting Up Queries
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Change format of date in query?



 
 
Thread Tools Display Modes
  #1  
Old April 22nd, 2010, 11:39 PM posted to microsoft.public.access.queries
Flopbot
external usenet poster
 
Posts: 60
Default Change format of date in query?

Can this be done? I hope I’m missing something small. A query named “Qry
Monthly Volunteer Email” has a field named [Date]. Right now it returns
4/24/2010 but I would like for it to return “Sat, 4/24/2010” to solve any
confusion as to day of the week. I modified the following from other
discussions on this subject, but it continues to return 4/24/2010.

SELECT [Tbl Vol Opportunities].Date, Format([Date],"ddd, mm/dd/yy")

Thank you for your help!

  #2  
Old April 23rd, 2010, 12:13 AM posted to microsoft.public.access.queries
John W. Vinson
external usenet poster
 
Posts: 18,261
Default Change format of date in query?

On Thu, 22 Apr 2010 15:39:01 -0700, Flopbot
wrote:

Can this be done? I hope Im missing something small. A query named Qry
Monthly Volunteer Email has a field named [Date]. Right now it returns
4/24/2010 but I would like for it to return Sat, 4/24/2010 to solve any
confusion as to day of the week. I modified the following from other
discussions on this subject, but it continues to return 4/24/2010.

SELECT [Tbl Vol Opportunities].Date, Format([Date],"ddd, mm/dd/yy")

Thank you for your help!


Are you viewing the query datasheet itself? If so, don't; table and query
datasheets are very limited and not really appropriate for viewing or editing
data. Instead use a Form (for onscreen) or Report (for printing). Bind the
datefield to a textbox on the form or report, and set that textbox's Format
property to

"ddd, mm/dd/yy"

If you're using the query as the rowsource for a combo box, set its
ColumnCount property to 2 (to include both the actual date/time and the
formatted string) and ColumnWidths to

0";1"

to display only the string and conceal the unformatted date.
--

John W. Vinson [MVP]
  #3  
Old April 23rd, 2010, 12:16 AM posted to microsoft.public.access.queries
Flopbot
external usenet poster
 
Posts: 60
Default Change format of date in query?

Actually, I answered my own question. It worked great! I didn't realize
that Access added a "column" at the end of the query which I couldn't see
without scrolling over. The new "Field" is labeled:

Expr1: Format([Date],"ddd, mm/dd/yy")

If anyone else needs to know, this works great!

"Flopbot" wrote:

Can this be done? I hope I’m missing something small. A query named “Qry
Monthly Volunteer Email” has a field named [Date]. Right now it returns
4/24/2010 but I would like for it to return “Sat, 4/24/2010” to solve any
confusion as to day of the week. I modified the following from other
discussions on this subject, but it continues to return 4/24/2010.

SELECT [Tbl Vol Opportunities].Date, Format([Date],"ddd, mm/dd/yy")

Thank you for your help!

  #4  
Old April 23rd, 2010, 02:23 AM posted to microsoft.public.access.queries
Flopbot
external usenet poster
 
Posts: 60
Default Change format of date in query?

John,

Thank you for responding. You always have great ideas and tips. Yes, I was
looking at the datasheet but it’s good to know that forms and reports are a
more appropriate venue. I was planning on cutting & pasting the results from
this query into a mail merged email (for some reason Word’s import database
wizard won’t recognize half my queries). Therefore, I wanted the day to be
listed right in the query. However, would there be a better method?

Chris


"John W. Vinson" wrote:

On Thu, 22 Apr 2010 15:39:01 -0700, Flopbot
wrote:

Can this be done? I hope I’m missing something small. A query named “Qry
Monthly Volunteer Email” has a field named [Date]. Right now it returns
4/24/2010 but I would like for it to return “Sat, 4/24/2010” to solve any
confusion as to day of the week. I modified the following from other
discussions on this subject, but it continues to return 4/24/2010.

SELECT [Tbl Vol Opportunities].Date, Format([Date],"ddd, mm/dd/yy")

Thank you for your help!


Are you viewing the query datasheet itself? If so, don't; table and query
datasheets are very limited and not really appropriate for viewing or editing
data. Instead use a Form (for onscreen) or Report (for printing). Bind the
datefield to a textbox on the form or report, and set that textbox's Format
property to

"ddd, mm/dd/yy"

If you're using the query as the rowsource for a combo box, set its
ColumnCount property to 2 (to include both the actual date/time and the
formatted string) and ColumnWidths to

0";1"

to display only the string and conceal the unformatted date.
--

John W. Vinson [MVP]
.

 




Thread Tools
Display Modes

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump


All times are GMT +1. The time now is 01:00 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright 2004-2024 OfficeFrustration.
The comments are property of their posters.