Change date format

rio

Registered User.
Local time
Today, 15:33
Joined
Jun 3, 2008
Messages
124
I make a query like this:

SELECT Table1.Date, Table1.Place, Table1.Person, "I meet " & [Person] & " at " & [Place] & " on " & [Date] AS Story
FROM Table1;

for the date it come out with 2/11/2009 format... how to change it to 11/Feb/2009.

Please... help me.

I'm also attach the database.
 

Attachments

Use the Format() function to format the date as desired. More info in Help.
 
sorry... can u show me how to put it in sql.
 
should be somethings like =Format([Date], "dd/mmm/yyyy")
or even =Format([Date], "Medium Date") might work.

where are you making this query? as SQL behind a form/report? or in design view?

(by the way, it's bad forum etiquette to PM users and direct them to new threads - first off, i can check new posts via the "new posts" link at the top of every page, and second, it's my perogative whether i choose to involve myself in a thread or not, that is to say, there's nothing to guarantee that i'll actually know the answer or even if i do, that i'll be able to help...)
 
ok, downloaded your mdb. i see you are using this in a query - whenever i have to do ANYTHING in a query and am ABLE to use the DESIGN view, then i do. i don't even try to do it in SQL view (not to start, anyway). once i have it working from design view, then i can check how to make the proper SQL syntax by clicking on SQL view.

there are other things you should know:

"Date" is an access reserved word. you should never name anything using a reserved word (could cause issues in future, especially with SQL).

also, this formatting issue could have been extremely easily found by searching these forums or google, or even access help. if you did any of these searches you could have saved time end effort on many other people's parts, and learnt better for yourself.

...good luck with your projects.
 
should be somethings like =Format([Date], "dd/mmm/yyyy")
or even =Format([Date], "Medium Date") might work.

Thanks 4 ur help

where are you making this query? as SQL behind a form/report? or in design view?

I make it using design view.

(by the way, it's bad forum etiquette to PM users and direct them to new threads - first off, i can check new posts via the "new posts" link at the top of every page, and second, it's my perogative whether i choose to involve myself in a thread or not, that is to say, there's nothing to guarantee that i'll actually know the answer or even if i do, that i'll be able to help...)

Sorry...:(

Thanks.. again.
 
U can see the attachment to understand what i mean.
 

Attachments

  • Picture2.jpg
    Picture2.jpg
    80.8 KB · Views: 120
Try

SELECT Table1.Date, Table1.Place, Table1.Person, "I meet " & [Person] & " at " & [Place] & " on " & Format([Date],"dd-mmm-yyyy") AS Story
FROM Table1;
 
Try

SELECT Table1.Date, Table1.Place, Table1.Person, "I meet " & [Person] & " at " & [Place] & " on " & Format([Date],"dd-mmm-yyyy") AS Story
FROM Table1;

Thanks... it working as i need.
 

Users who are viewing this thread

Back
Top Bottom