Exit
  • Global community
    • Language:
      • Deutsch
      • English
      • Español
      • Français
      • Português
  • 日本語コミュニティ
  • 한국 커뮤니티
0

problem with select query in search

New Here ,
Nov 19, 2009 Nov 19, 2009

Hi,

Here i am using MYSQL database and when i am insertind date to database it is saving like  '2009-11-10 00:00:00'  and when i used to dispaly this in dateformat as '11/10/2009' .

here is the problem occurs , when i write a search query as

select recruitername,interviewdate ,skillset
             from details
              where interviewdate = #form.interviewdate#

i am getting problem with date . would u please help me how to solve this issue .

TOPICS
Getting started
317
Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines

correct answers 1 Correct answer

Valorous Hero , Nov 19, 2009 Nov 19, 2009

Or better yet, a <cfqueryparam...> with a date type.

WHERE interviewdate = <cfqueryparam value="#form.interviewdate#" cfsqltype="cf_sql_date">

Translate
Community Beginner ,
Nov 19, 2009 Nov 19, 2009

Try to use DateFormat

select recruitername,interviewdate ,skillset
             from details
              where interviewdate = #DateFormat(form.interviewdate, "yyyy-dd-mm")#



Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Valorous Hero ,
Nov 19, 2009 Nov 19, 2009
LATEST

Or better yet, a <cfqueryparam...> with a date type.

WHERE interviewdate = <cfqueryparam value="#form.interviewdate#" cfsqltype="cf_sql_date">

Translate
Report
Community guidelines
Be kind and respectful, give credit to the original source of content, and search for duplicates before posting. Learn more
community guidelines
Resources