how to change the date format
-
i have a date format in 06/01/2008 which datatype is nvarchar(50).how i will change it into 06/jan/2008 format in sql. Plz help me. select log_in_date from test1 out_put 06/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2
-
i have a date format in 06/01/2008 which datatype is nvarchar(50).how i will change it into 06/jan/2008 format in sql. Plz help me. select log_in_date from test1 out_put 06/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2
mon***z wrote:
nvarchar(50).
I am not sure about NVarchar, but if you were using
DateTime
type, useconvert
function to change the display format.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
-
mon***z wrote:
nvarchar(50).
I am not sure about NVarchar, but if you were using
DateTime
type, useconvert
function to change the display format.All C# applications should call Application.Quit(); in the beginning to avoid any .NET problems.- Unclyclopedia How to use google | Ask smart questions
thanks man for your answer I missed the namespace
Messagebox.show("Invalid Data Entry");
ANd the message Messagebox, does not Exists in the Current Context ThanksVuyiswa Maseko, Sorrow is Better than Laughter, it may Sadden your Face, but It sharpens your Understanding VB.NET/SQL7/2000/2005 http://vuyiswamb.007ihost.com http://Ecadre.007ihost.com vuyiswam@tshwane.gov.za
-
i have a date format in 06/01/2008 which datatype is nvarchar(50).how i will change it into 06/jan/2008 format in sql. Plz help me. select log_in_date from test1 out_put 06/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 06/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 07/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 08/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 09/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 10/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 11/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 12/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 13/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 14/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 15/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2008 16/01/2
Well, a couple of sample dates would have done rather than dozens, but your answer is: Using @a to represent your column
declare @a nvarchar(50) set @a = '28/10/2008' set dateformat dmy select convert(varchar,datepart(day,@a)) + '/' + left(datename(month,@a),3) + '/' + convert(varchar,datepart(year,@a))
You need the set dateformat dmy so SQL knows its day month yearBob Ashfield Consultants Ltd