thank you very much..........
still i need to refine like this........here we r printing year,mth,day in a single column..can u tell how to put that yr,mth,day in a seperate columns..
can u explain..........@start +(cast(1 as float)/24/4........i did not understand 1 as float
There are sql functions which can strip date parts from a date. For your first question,
Select Year([date]),month([Date]), day([Date])
Have a look at BOL for dateparts
By adding a value 1 to a date you get the next day value. So in theory 1=1 day. Your reqiurement needed to be incremented by 15min.
So 1/12, will give us an hour value further /4 will give us quarter of an hour.
the cast ( as float) forces SQL not to look at it as an integer, because we are adding decimals.
hope this makes sense.