|
-
July 25th, 2004, 06:24 PM
#1
HOW: formatting date in sql
hi,
i got an Access db and i want to make an SQL query
that retrieve a date field and but with this format (mm/yyyy).
how do i do it in SQL (of access db)?
anyone?
-
July 27th, 2004, 09:47 PM
#2
You could try:
Code:
SELECT Format(Now(), "mm") + '/' + Format(Now(), "yyyy") AS MyDate;
...and substitute your date column for the calls to Now()
Hope this helps,
- Nigel
-
October 14th, 2004, 05:00 AM
#3
Re: HOW: formatting date in sql
Useful code,
I used it to get a date in the form mm/dd/yy (I am in UK but needed to do this)
Is there a way to get a date to show like this
Thursday October 14, 2004 (note just one , ) also is there an option to add the two letters after the date ie 14th, 2nd etc. I can display the number but not the bit after.
EDIT1
I would also like to have the date as shown above all in one coloum I have done this and it works, but can I have tabs so that the Day, Date, Month, ,and year line up.
Also can you add time in Access I get 00:00 for all using HH:nn
Last edited by pjb007; October 14th, 2004 at 05:30 AM.
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|