Solved

dateformat not working quite right

Posted on 2003-11-09
2
347 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
  • 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 75 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

PRTG Network Monitor: Intuitive Network Monitoring

Network Monitoring is essential to ensure that computer systems and network devices are running. Use PRTG to monitor LANs, servers, websites, applications and devices, bandwidth, virtual environments, remote systems, IoT, and many more. PRTG is easy to set up & use.

Question has a verified solution.

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

Introduction This article explores the design of a cache system that can improve the performance of a web site or web application.  The assumption is that the web site has many more “read” operations than “write” operations (this is commonly the ca…
When it comes to showing a 404 error page to your visitors, you do not want that generic page to show, and you especially do not want your hosting provider’s ad error page to show either. In this article, I will show you how to enable the custom 40…
Along with being a a promotional video for my three-day Annielytics Dashboard Seminor, this Micro Tutorial is an intro to Google Analytics API data.
This Micro Tutorial demonstrates using Microsoft Excel pivot tables, how to reverse engineer competitors' marketing strategies through backlinks.

778 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