|
|
|||||||||
|
|||||||||
|
|||||||||
| |
|||
| |||||||||
![]() |
|
|
«
Previous Thread
|
Next Thread
»
|
Thread Tools | Search this Thread | Display Modes |
|
|
|
Stay one step ahead of the competition. Evaluate and give feedback
on some of the hottest web development tools on the market today.
Make your opinion heard! Click
Here
|
|
#1
|
|||
|
|||
|
I am totally new to the SQL Develpment world. i am trying to find a way to extract on the date from a date time field. In the SQL datebase column name= [date] data type= datetime length=8.
On my asp page I have it calling in field. And then i have displayed it by <&k_date&>. Please help Thanks |
|
#2
|
|||
|
|||
|
in MSSQL you can write the following:
Code:
select convert (varchar, YourColumn, 104) from table the 104 according to the following table: (I know it's hardly readable, because I copied out of a Help-File) Quote:
|
|
#3
|
|||
|
|||
|
Quote:
you can use an inbuilt function in sql called 'datepart' which takes 2 parameters ......the part u want to extract and the column name eg. select datepart(dd,getdate() ) from temp this will give you the date of present day. similarly u can use 'yy','hh','mi','s' and 'mm' to find to get year,hour,minutes,seconds resp hope this helps ya..... regards, Radhika. eg |
![]() |
| Viewing: Dev Articles Community Forums > Databases > General SQL Development > Pulling out only the date from the datetime field |
| Thread Tools | Search this Thread |
| Display Modes | Rate This Thread |
|
|
|
|