Tek-Tips is the largest IT community on the Internet today!

Members share and learn making Tek-Tips Forums the best source of peer-reviewed technical information on the Internet!

  • Congratulations Mike Lewis on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

convert date to string

Status
Not open for further replies.

jesse1

Programmer
Aug 29, 2008
30
US
I am embarrassed to ask this but I am going crazy.

I am using the following query.
Code:
<cfquery name="dddd"  username="rrrr" password="ddddd" datasource ="ggggg">
   select  sched_date, districth, districta, gameid, hour, minutes, meridian 
    from spSchedule 
    where sched_date = #createodbcdate(Now())#
</cfquery>
The problem is sched_date is a varchar(50). This happened when the database was converted to mySql. Converting it to a date field is not an option at this time due to other programmers.

The code does not work I assume because I am comparing a string to a date.
 
Nevermind
'#dateformat(now(), 'mm/dd/yyyy')#'
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top