Click here to Skip to main content
15,897,704 members

Comments by tulasiram3975 (Top 195 by date)

tulasiram3975 9-Oct-12 4:04am View    
thank you...
working great
tulasiram3975 26-Sep-12 13:07pm View    
it not working correctly if so it needs to fetch 25th date after details employee details should show but it won't i think need to change query condition..
i tried in different ways but am not getting accurate result
tulasiram3975 26-Sep-12 11:39am View    
but i have a problem when it have more dates like 09/25/2012 and 09/26/2012 it is not showing rest of empids let my table be like
uid empid datetime
1 9003 2012-09-26 09:20:00
3 9000 2012-09-26 09:20:00
4 9004 2012-09-26 09:20:00
5 9002 2012-09-26 09:20:00
7 9001 2012-09-26 09:20:00
18 9004 2012-09-25 09:15:00
17 9000 2012-09-25 09:15:00
11 9004 2012-09-26 08:59:00
12 9002 2012-09-26 08:59:00
15 9003 2012-09-25 09:15:00
14 9001 2012-09-26 08:59:00
19 9002 2012-09-25 09:15:00
21 9001 2012-09-25 09:15:00
am trying like:
select * from attlog where TIME(datetime )>='09:00:00' and empid not in (select empid from attlog where TIME( datetime )<'09:00:00') AND DATE_FORMAT(DATE( datetime ) , '%m/%d/%Y' )
BETWEEN '09/25/2012'
AND '09/26/2012'
now it is show like:
uid empid datetime
1 9003 2012-09-26 09:20:00
3 9000 2012-09-26 09:20:00
17 9000 2012-09-25 09:15:00
15 9003 2012-09-25 09:15:00
but it has to show like
uid empid datetime
1 9003 2012-09-26 09:20:00
3 9000 2012-09-26 09:20:00
18 9004 2012-09-25 09:15:00
17 9000 2012-09-25 09:15:00
15 9003 2012-09-25 09:15:00
19 9002 2012-09-25 09:15:00
21 9001 2012-09-25 09:15:00
22 9000 2012-09-25 09:15:00
23 9003 2012-09-25 09:15:00
like it should show..
tulasiram3975 26-Sep-12 11:22am View    
ok sir thank you i got some idea am checking like TIME(datetime) <'09:00:00'
in this way..
tulasiram3975 26-Sep-12 11:13am View    
Yes you are absolutely right but there is no DATEPART function sir...