SQL Date from a string
Posted on 2016-09-12
Hello EE, I have a column field in a table called "Instruction Text"
inside, users are puting text and a date such as :
DATE JOB FOR OCTOBER 20 BlaBlaBla
Date job for November 18 BlaBlaBla
I know its not the right way to do things, dont worry, but until this get fix, I need a way to be able to search this field and do a where clause with BETWEEN Dates to search and get results.
for example WHERE (do stuffhere) >= date1
I know we could do a LIKE and get date as a string but I need the user to be able to search either FROM DATE OR TO DATE
in other words, the user could enter only a from date and not a TO Date (so we cannot use Between)
or vice versa....
can you help me?
i know what you are going to say, if text is like this " OCTOBER20" without space it will not work, well thats the user problem. they have a shitty system its not our problem.