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. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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
|
|||
|
|||
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 | |
|
|