Click here to Skip to main content
15,922,584 members
Please Sign up or sign in to vote.
0.00/5 (No votes)
See more:
To display the date column containing "19/"

Query

SELECT username,DATE_FORMAT(dialdate,GET_FORMAT(DATE,'EUR')) as new,DATE_FORMAT(dialtime,'%r') as dialtime,price FROM processeddata_table WHERE DialDate between '2008/07/04' and '2013/07/26' and dialdate like '%19/% 00:00:00'
Posted

ur,what is your problem ?

SQL
SELECT username,DATE_FORMAT(dialdate,GET_FORMAT(DATE,'EUR')) as new,DATE_FORMAT(dialtime,'%r') as dialtime,price FROM processeddata_table WHERE DialDate between '2008/07/04' and '2013/07/26' and dialdate like '%19%' 
 
Share this answer
 
Comments
Roopa 10064853 26-Jul-13 2:21am    
I want to display dialdate containing 19/
Chui PuiKwan 26-Jul-13 2:24am    
1.like '%19/%'
2.
INSTR(dialdate,'19/')>0
Roopa 10064853 26-Jul-13 2:41am    
thank u but not getting any output
Chui PuiKwan 26-Jul-13 2:48am    
If you could give me a demo data, I can help you to debug it .
Roopa 10064853 26-Jul-13 2:52am    
2013-12-12
Simply ;)
Use LEFT[^] function.

SQL
SELECT ...
FROM ....
WHERE ... LEFT(dialdate,2) = '19'


More about String functions[^]

Note: Is this statement true: (year>=2008 And year <=2013) AND (year>=1900 AND year<=1999)?
 
Share this answer
 
v2

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