| Author |
Topic |
|
baska123
Yak Posting Veteran
64 Posts |
Posted - 2007-08-16 : 16:13:38
|
| Date is saved in a format of date and time. I just want the date portion of it.select pp.APPROVE_DT .................... |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-16 : 16:14:32
|
| SELECT DATEADD(d,1,DATEDIFF(d,0,YourDateColumn))Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
SwePeso
Patron Saint of Lost Yaks
30421 Posts |
Posted - 2007-08-16 : 16:18:37
|
Tomorrow's date, dinakar? SELECT DATEADD(day, DATEDIFF(day, 0, YourDateColumn), 0) E 12°55'05.25"N 56°04'39.16" |
 |
|
|
baska123
Yak Posting Veteran
64 Posts |
Posted - 2007-08-16 : 16:18:59
|
| Date looks like that8/15/2007 3:51:24 PMand I want it in this format8/15/2007 |
 |
|
|
ashley.sql
Constraint Violating Yak Guru
299 Posts |
Posted - 2007-08-16 : 16:20:52
|
| select convert(varchar(10), getdate(), 110)Ashley Rhodes |
 |
|
|
ashley.sql
Constraint Violating Yak Guru
299 Posts |
Posted - 2007-08-16 : 16:21:21
|
| sorry that was a typoselect convert(varchar(10), getdate(), 101)Ashley Rhodes |
 |
|
|
ashley.sql
Constraint Violating Yak Guru
299 Posts |
Posted - 2007-08-16 : 16:22:00
|
| ORselect convert(varchar(10), '8/15/2007 3:51:24 PM', 101)you can replace getdate() with your column nameAshley Rhodes |
 |
|
|
dinakar
Master Smack Fu Yak Hacker
2507 Posts |
Posted - 2007-08-16 : 20:42:50
|
quote: Originally posted by Peso Tomorrow's date, dinakar? SELECT DATEADD(day, DATEDIFF(day, 0, YourDateColumn), 0) E 12°55'05.25"N 56°04'39.16"
oops.. cut/paste error... Dinakar Nethi************************Life is short. Enjoy it.************************http://weblogs.sqlteam.com/dinakar/ |
 |
|
|
khtan
In (Som, Ni, Yak)
17689 Posts |
Posted - 2007-08-16 : 22:43:03
|
quote: Originally posted by baska123 Date looks like that8/15/2007 3:51:24 PMand I want it in this format8/15/2007
use Dinakar method to remove the time component of the date. Format your date in your front end. Not in SQL.[spoiler]Copyright Madhi[/spoiler] KH[spoiler]Time is always against us[/spoiler] |
 |
|
|
madhivanan
Premature Yak Congratulator
22864 Posts |
Posted - 2007-08-17 : 02:19:36
|
quote: Originally posted by baska123 Date looks like that8/15/2007 3:51:24 PMand I want it in this format8/15/2007
Where do you want to show fomratted dates?MadhivananFailing to plan is Planning to fail |
 |
|
|
|