?
Solved

dateformat not working quite right

Posted on 2003-11-09
2
Medium Priority
?
367 Views
Last Modified: 2013-12-24
value="<CFOUTPUT>#DateFormat(Now(),"mm/dd/yyyy")#</CFOUTPUT>"

this looks perfect in the form field. but in my mysql database i'm getting this (instead of 11/9/2003):

9/20/2011 3:00:00 AM

the field in the database is set to datetime format.  any ideas??
0
Comment
Question by:phillystyle123
[X]
Welcome to Experts Exchange

Add your voice to the tech community where 5M+ people just like you are talking about what matters.

  • Help others & share knowledge
  • Earn cash & points
  • Learn & ask questions
  • 2
2 Comments
 
LVL 12

Expert Comment

by:jyokum
ID: 9710813
how are you inserting it into the database?
0
 
LVL 12

Accepted Solution

by:
jyokum earned 300 total points
ID: 9710823
should be using CFQUERYPARAM. something like

INSERT INTO tablename (dateColumn)
VALUES (<cfqueryparam value="#now()#" cfsqltype="cf_sql_timestamp">)
0

Featured Post

Free Tool: ZipGrep

ZipGrep is a utility that can list and search zip (.war, .ear, .jar, etc) archives for text patterns, without the need to extract the archive's contents.

One of a set of tools we're offering as a way to say thank you for being a part of the community.

Question has a verified solution.

If you are experiencing a similar issue, please ask a related question

A web service (http://en.wikipedia.org/wiki/Web_service) is a software related technology that facilitates machine-to-machine interaction over a network. This article helps beginners in creating and consuming a web service using the ColdFusion Ma…
Periodically we have to update or add SSL certificates for customers. Depending upon your hosting plan you may be responsible for the installation and/or key generation. In the wake of Heartbleed many sites were forced to re-key. We will concen…
Michael from AdRem Software outlines event notifications and Automatic Corrective Actions in network monitoring. Automatic Corrective Actions are scripts, which can automatically run upon discovery of a certain undesirable condition in your network.…
In this video, Percona Solutions Engineer Barrett Chambers discusses some of the basic syntax differences between MySQL and MongoDB. To learn more check out our webinar on MongoDB administration for MySQL DBA: https://www.percona.com/resources/we…
Suggested Courses

764 members asked questions and received personalized solutions in the past 7 days.

Join the community of 500,000 technology professionals and ask your questions.

Join & Ask a Question