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 MikeeOK on being selected by the Tek-Tips community for having the most helpful posts in the forums last week. Way to Go!

Format of a date entry field

Status
Not open for further replies.

Curler

IS-IT--Management
Oct 27, 2002
89
CA
I am not familiar with ColdFusion but have a question to ask regarding the entry of date information. My client has designed their other data entry screens (not ColdFusion) so that dates are entered as 05MAR07 to avoid the ambiguity of entering dates in the 030507 or is that 050307 format. They have been told by their ColdFusion developer that dates can't be entered that way. This sounds very suspicious to me. Is it just that the routine to test a nnaaann entry might be a little tricky and is not a built in ColdFusion function or is there some ColdFusion technical issue that prevents this?
 
ColdFusion has nothing to do with this, it's going to be whatever database you're using. ColdFusion can format a date in any way you want it, but when the date is stored in the database it has to be formatted to the database's standards.

So, technically this is correct:
They have been told by their ColdFusion developer that dates can't be entered that way.
It just appears that their developer didn't clarify that it's a database issue, and not ColdFusion.


Hope This Helps!

ECAR
ECAR Technologies

"My work is a game, a very serious game." - M.C. Escher
 
The data is stored on a Microsoft SQL server. A similar data entry system developed with Visual Basic that stores data in a different database but on the same server does use the nnaaann format. I don't know how the data is actually stored in the database. Could Coldfusion reformat it for display/entry purposes but store as a date?
 
I don't know how the data is actually stored in the database
in SQL Server, datetime values are actually stored as two integers -- one integer for the number of days since the zero date, and the other integer for the number of milliseconds after midnight


the point is, it does not matter how the date is actually stored in the database, the only thing you need to worry about are the various formats that SQL Server will recognize as a valid date

in general, you can enter date values into a web form any way the user wishes, as long as the front end app (coldfusion in this case) reformats what was entered into one of the acceptable valid input date formats for the database

and you know what? 05MAR07 is one of the formats that SQL Server recognizes

so your CF developer was blowing smoke :)

r937.com | rudy.ca
 
Status
Not open for further replies.

Part and Inventory Search

Sponsor

Back
Top