Sign In| Join
Get Help:Ask a Question in our Forums|Report a Bug|More Help Resources
Last post May 24, 2012 12:52 PM by RameshRajendran
Member
122 Points
140 Posts
May 24, 2012 12:36 PM|LINK
hi for all
i make datetime column in table employee that have name birthday it's by default have this format
mm/dd/yyyy
how can i make format on that column in database like this
dd/mm/yyyy
i have sqlserver express 2005
please ;i want answer
All-Star
66017 Points
7639 Posts
Moderator
May 24, 2012 12:39 PM|LINK
CDate(YourDate.ToString("dd/MM/yyyy"))
Participant
1144 Points
198 Posts
May 24, 2012 12:44 PM|LINK
In database you can get this
SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS DateOfBirth_Format
You can here see the the list of Date formats
http://www.sql-server-helper.com/tips/date-formats.aspx
May 24, 2012 12:47 PM|LINK
i want create table have colum from datetime type which that have this form dd/mm/yyyy
and when i want to insert date in the colum i can do that without converting
how can change colum format ?this my question
May 24, 2012 12:49 PM|LINK
Its based on the Date format on the server that SQL resides on.
May 24, 2012 12:51 PM|LINK
how can i change it
Star
7983 Points
2099 Posts
May 24, 2012 12:52 PM|LINK
hai
change u r colomn datatype is date.but datetime is working u display time format...
dv[0][""].ToString("dd/MM/yyyy");
thank u..
tareq.tareq
Member
122 Points
140 Posts
change datetime column format
May 24, 2012 12:36 PM|LINK
hi for all
i make datetime column in table employee that have name birthday it's by default have this format
mm/dd/yyyy
how can i make format on that column in database like this
dd/mm/yyyy
i have sqlserver express 2005
please ;i want answer
Curt_C
All-Star
66017 Points
7639 Posts
Moderator
Re: change datetime column format
May 24, 2012 12:39 PM|LINK
CDate(YourDate.ToString("dd/MM/yyyy"))
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
kashifilyaz
Participant
1144 Points
198 Posts
Re: change datetime column format
May 24, 2012 12:44 PM|LINK
In database you can get this
SELECT CONVERT(VARCHAR(10), GETDATE(), 103) AS DateOfBirth_Format
You can here see the the list of Date formats
http://www.sql-server-helper.com/tips/date-formats.aspx
tareq.tareq
Member
122 Points
140 Posts
Re: change datetime column format
May 24, 2012 12:47 PM|LINK
i want create table have colum from datetime type which that have this form dd/mm/yyyy
and when i want to insert date in the colum i can do that without converting
how can change colum format ?this my question
Curt_C
All-Star
66017 Points
7639 Posts
Moderator
Re: change datetime column format
May 24, 2012 12:49 PM|LINK
Its based on the Date format on the server that SQL resides on.
v5.1 of iTracker (Inventory Tracker Starter Kit) is out, Download it now!
tareq.tareq
Member
122 Points
140 Posts
Re: change datetime column format
May 24, 2012 12:51 PM|LINK
how can i change it
RameshRajend...
Star
7983 Points
2099 Posts
Re: change datetime column format
May 24, 2012 12:52 PM|LINK
hai
change u r colomn datatype is date.but datetime is working u display time format...
dv[0][""].ToString("dd/MM/yyyy");
thank u..