Click here to Skip to main content
15,886,752 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
hi frens, its me bishnu karki
i want to retrieve all datas in crystal report but only by using the date and not the time, i have datas in which it has both date and time in single data value , how can i seperate it and get the required datas, please help me ............
Posted
Comments
Bala Selvanayagam 3-Nov-11 8:20am    
vishnu

If you have a question, please use the "Have a question or comment" right below my solution and i will be notified by an email immediately but please do not post your questions as an another solution

CreatedDateTime is one of my column in the table employees with a sample date of "14 Jun 1990 12:47 AM" with time part.

the two CAST operations and FLOOR will remote the time part and make it for example "14 June 1990" which can be compared with your input date

Hope this helps

You can remove the time element.

for example

SQL
select *
from   employees
where CAST(floor( CAST( CreatedDateTime AS FLOAT ) )AS DATETIME) = '13 Jun 1967'
 
Share this answer
 
v2
is CreatedDateTime the name of column of table? and what is cast and floor please reply soon
 
Share this answer
 
Comments
Bala Selvanayagam 3-Nov-11 8:21am    
vishnu

If you have a question, please use the "Have a question or comment" right below my solution and i will be notified by an email immediately but please do not post your questions as an another solution

CreatedDateTime is one of my column in the table employees with a sample date of "14 Jun 1990 12:47 AM" with time part.

the two CAST operations and FLOOR will remote the time part and make it for example "14 June 1990" which can be compared with your input date

Hope this helps

This content, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)



CodeProject, 20 Bay Street, 11th Floor Toronto, Ontario, Canada M5J 2N8 +1 (416) 849-8900