Click here to Skip to main content
Rate this: bad
good
Please Sign up or sign in to vote.
See more: C#
in the out put i have date in the 28/1/2013 format.
 
i want to change the date format in to 28 jan.
 
how can i get the 28 jan format in ms access database not in sql.
 
i wanted in MSAccess database.
 
how can i do.
 
i try the below query is not working
 
select CONVERT(varchar(11), Sch_Date, 106) AS schDate, [Session],[Faculty_Code] from Tb_SCh_TIme_Table
 
from my above query what is the mistake i made.help me. i tried but not get the 28 jan ouput.
Posted 31-Jan-13 20:50pm
Comments
Zoltán Zörgő at 1-Feb-13 1:56am
   
This question is confusing. You tagged your question with c#, but you ask for some access solution. But if you use c#, why do you want to format your date field on database level?

1 solution

Rate this: bad
good
Please Sign up or sign in to vote.

Solution 1

Use Format function: http://www.techonthenet.com/access/functions/date/format.php[^]
 
SELECT Format (Sch_Date, "dd\/mm\/yyyy")
FROM b_SCh_TIme_Table
 
Note the "\". You can omit it, but if you do, the system local could override it.
 
Update:
Use Format (D, "dd mmm") to get "28 jan" format.
  Permalink  
v3

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)

  Print Answers RSS
0 Sergey Alexandrovich Kryukov 8,478
1 OriginalGriff 6,516
2 Peter Leow 3,587
3 Zoltán Zörgő 3,406
4 Richard MacCutchan 2,397


Advertise | Privacy | Mobile
Web04 | 2.8.150123.1 | Last Updated 1 Feb 2013
Copyright © CodeProject, 1999-2015
All Rights Reserved. Terms of Service
Layout: fixed | fluid

CodeProject, 503-250 Ferrand Drive Toronto Ontario, M3C 3G8 Canada +1 416-849-8900 x 100