I did settle on using float so one of my typical tables definition looks like this: NB. --------------------------------------------------------- NB. Worlds NB. Each world is a sumulation ... Worlds=: noun define WorldID varchar; Description varchar CreatedBy varchar CreateDate float )
In the long run, it would be better to keep it as a number then convert it to strings when needed. -----Original Message----- From: [email protected] [mailto:[email protected]] On Behalf Of Jim Russell Sent: Sunday, November 29, 2009 10:59 PM To: General forum Subject: Re: [Jgeneral] JDB: DateTime datatype I'd stick with the ms-SQL convention of float days and fractions since some base date (1/1/1900). It should make date arithmetic (datediff, dateadd) easier. Datetime or smalldatetime depending on your need for millisecond precision. On Nov 29, 2009, at 9:55 AM, Alex Rufon <[email protected]> wrote: > As I am rebuilding my database from MS-SQL to JDB, I stumbled upon a > question. How do I store DateTime in JDB? > > My initial reaction was to store it as a string in this format: > "YYYY-MM-DD HH:MM:SS" but then I could also store them as a floating > number in this format YYYYMMDD.datefraction > > Both ways have pros and cons and in my tally they are about the > same ... anybody has an opinion? > > Thanks. > > > ---------------------------------------------------------------------- > For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm ---------------------------------------------------------------------- For information about J forums see http://www.jsoftware.com/forums.htm
