Sam Farmer

Growing up I never imagined I would play bass guitar for the Dave Matthews Band. And indeed it never happened.

But I have become passionate about making software.

ORM and Dates? You probably want timestamp

November 22, 2010

Data types for dates and times are slightly different across databases which often makes life difficult for us developers. ColdFusion ORM makes this pretty simple:

There are no other options!

Full example with the property tag:

property name="aFullDateWithTime" ormtype="timestamp"; property name="justADate" ormtype="date";


How would I create a MS SQL TimeStamp though?????

By: Darrin 03/28/2012 9:45 AM
Several options: You can set the database to use timestamp on the column. You can use the optimistic locking: And set property name="lastModified" fieldtype="timestamp"; You could also look into the DDL options:

By: Sam Farmer 03/28/2012 10:07 AM
Some comments have been lost over the years due to moving hosts.


More blog entries that I have written.

Code coloring by PRISM.