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 |
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-07-07 : 02:39:09
|
| when I use convert(datetime,inv_date,111) it is giving me err sayingthe conversion of the char datatype to a datetime data type resulted in an out-forange datetime value.inv_date has values like '23/11/2006' stored as varchar datatype,I want to bring these values to a another table which has correspounding col data type as datetime.isdate('23/11/2006') is giving 0 value |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-07 : 02:40:27
|
DD/MM/YYYY is 103convert(datetime,inv_date,103) KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
aakcse
Aged Yak Warrior
570 Posts |
Posted - 2009-07-07 : 02:47:49
|
| Thanks now it is working however what If I do not want the time part in this, as the original table was not having time part |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2009-07-07 : 02:53:11
|
if you are using datatime data type, the date and time are together in same column. Unless you are using SQL 2008 you can have date and time separately as with date data type and time data type. KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
bklr
Master Smack Fu Yak Hacker
1693 Posts |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2009-07-07 : 05:15:47
|
quote: Originally posted by aakcse Thanks now it is working however what If I do not want the time part in this, as the original table was not having time part
If you want to show data in front end application, do formation thereMadhivananFailing to plan is Planning to fail |
 |
|
|
visakh16
Very Important crosS Applying yaK Herder
52326 Posts |
Posted - 2009-07-08 : 12:30:54
|
quote: Originally posted by aakcse Thanks now it is working however what If I do not want the time part in this, as the original table was not having time part
try to pass date values in iso format always (yyyyy-mm-dd hh:mm:ss)also for formatting try to apply functions available at front end as Madhi suggested |
 |
|
|
|
|
|
|
|