Please start any new threads on our new
site at https://forums.sqlteam.com. We've got lots of great SQL Server
experts to answer whatever question you can come up with.
Author |
Topic |
chalamasql
Starting Member
4 Posts |
Posted - 2013-06-04 : 09:03:13
|
I have CLOSED DATE OBJECT ITS CONTAIND DATA LIKE DD/MM/YYYY HH:MM:SS FORMAT(vARCHAR)BUT I WANT DD/MM/YYYY IN DATE FORMATHOW TO CONVERT FROM VACHAR TO DATE FORMAT(DD/MM/YYYY)PLEASE HELP MEchalama reddy |
|
webfred
Master Smack Fu Yak Hacker
8781 Posts |
Posted - 2013-06-04 : 09:09:00
|
What's the matter with your keyboard? CapsLock damaged? There is no datatype DATE in SQL Server 2000.Can you make more clear what you are trying to do? Too old to Rock'n'Roll too young to die. |
|
|
chalamasql
Starting Member
4 Posts |
Posted - 2013-06-04 : 09:21:41
|
Hi,we have a date column "ReviewDate" in the database. the values in the column is loaded in the format of "dd/mm/yy hh:mm:ss" ascharacter data type.But I need "dd/mm/yy hh:mm:ss" in datetime formatchalama reddy |
|
|
bandi
Master Smack Fu Yak Hacker
2242 Posts |
Posted - 2013-06-04 : 09:32:24
|
--Method1:Alter that table column (ReviewDate) to DATETIME--Method2:DECLARE @CharVar VARCHAR(40) = '04/06/13 18:58:30'SELECT CAST( @CharVar AS DATETIME) -- 2013-04-06 18:58:30.000--Chandu |
|
|
chalamasql
Starting Member
4 Posts |
Posted - 2013-06-04 : 09:43:53
|
I created like this wayConvert(DateTime,dbo.STAR_INP_GIT_STATUS_REP."Last Edited on",103)--- am getting output--2013-05-22 08:21:00.000 But I need "dd/mm/yy hh:mm:ss"chalama reddy |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2013-06-05 : 03:45:46
|
quote: Originally posted by chalamasql I created like this wayConvert(DateTime,dbo.STAR_INP_GIT_STATUS_REP."Last Edited on",103)--- am getting output--2013-05-22 08:21:00.000 But I need "dd/mm/yy hh:mm:ss"chalama reddy
Do not worry about how SQL Server displays the dates. When you show them to front end application, format them thereMadhivananFailing to plan is Planning to fail |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
|
|
|
|