From: David W. <dav...@ya...> - 2004-12-29 09:53:58
|
Hi Jeff, --- Jeff Smith <why...@ya...> wrote: > David, > > First, here is a little background info, FWIW. In > an MDB, > date/time info is stored as a 'double' containing > the > number days from 12/30/1899. Internally there is no > distinction between 6:00 and 12/30/1899 6:00 (0.25). > I believe information on how to format the output in > Access is stored elsewhere in the MDB. Try > exporting > a table with a date-less time from Access to a text > file > and you will see a date with it there too. Gotcha. > mdbtools has been using gmtime to populate a 'tm' > structure. > That only really works for 'unix time' though (1970 > - 2038). > I am looking at ways to populate it that would work > for dates > from 1/1/100 to 12/31/9999, as Access allows. This > would > still have the same issue with exporting as Access > does. But > maybe 1899 would be more acceptable in your case > than 1970. Currently I don't have a specific problem, I am trying to think ahead and anticipate problems that might crop up. 1899 will probably be less common than 1970, so this should help. I will add a note (based on your comments if that's okay) warning users about times without dates. > > BTW, with mdb-export you can use -D to set the > output format, > but this will be applied to the whole table, which > is probably > not what you had in mind. Yes, I use this to make sure the dates/times come out in a standard format. I think I'll add an option to change the default that I use. Thanks for your help. Dave > > -- Jeff Smith > > > --- David Whiting <dav...@ya...> wrote: > > Hi, > > > > I am playing with developing some wrappers to use > > mdbtools with a statistical package > > (www.r-project.org). I notice that mdb-export will > > export data stored as Date/Time type that only > contain > > the time component with the default date of > > 01/01/1970. This means that it will not be > possible > > for me to distinguish between real dates of > 01/01/1970 > > and times with missing dates. Is there any way to > > distinguish between the two, or is this a > limitation > > of the way access stores the data in the first > place? > > > > Dave > > > > > > __________________________________ > Do you Yahoo!? > The all-new My Yahoo! - What will yours do? > http://my.yahoo.com > > > ------------------------------------------------------- > SF email is sponsored by - The IT Product Guide > Read honest & candid reviews on hundreds of IT > Products from real users. > Discover which products truly live up to the hype. > Start reading now. > http://productguide.itmanagersjournal.com/ > _______________________________________________ > mdbtools-dev mailing list > mdb...@li... > https://lists.sourceforge.net/lists/listinfo/mdbtools-dev > ___________________________________________________________ ALL-NEW Yahoo! Messenger - all new features - even more fun! http://uk.messenger.yahoo.com |