[cfaussie] Date format

2007-04-03 Thread Tom MacKean
Hi all,

I am using ColdFusion to drag some data kicking and screaming out of a very
strange MS-based database. The date of birth field has values such as 716640
and 712672.

After a bit of mucking about I discovered that I can place this value in an
excel cell and change the format to date to give a value that seems to makes
sense. (The two values above yield 02.02.62 and 24.3.51 respectively).

Does anyone know what is going on here - and more importantly what can I do
in CF to 716640 to make it a date that I can use as a normal date.

Cheers,

Tom

-- 
IMPORTANT: This email is intended for the use of the individual addressee(s)
named above and may contain information that is confidential privileged or
unsuitable for overly sensitive persons with low self-esteem, no sense of
humor or irrational religious beliefs. If you are not the intended
recipient, any dissemination, distribution or copying of this email is not
authorized (either explicitly or implicitly) and constitutes an irritating
social fauxpas. No animals were harmed in the transmission of this email,
although the mutt next door is living on borrowed time, let me tell you.

--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---



[cfaussie] Date format

2007-04-03 Thread Karen Johnstone
Hi Tom,
 
According to http://www.joelonsoftware.com/items/2006/06/16.html:
In most modern programming environments, dates are stored as real
numbers. The integer part of the number is the number of days since some
agreed-upon date in the past, called the epoch. In Excel, today's date, June
16, 2006, is stored as 38884, counting days where January 1st, 1900 is 1.
...Basic uses December 31, 1899 as the epoch
 
I put the numbers in Excel 2003  got 2/02/3862 and 24/03/3851.
 
You might want to google for the epoch of your strange MS-based database
:)
 
kj

  _  

From: cfaussie@googlegroups.com [mailto:[EMAIL PROTECTED] On Behalf
Of Tom MacKean
Sent: Wednesday, 4 April 2007 9:27 AM
To: cfaussie@googlegroups.com
Subject: [cfaussie] Re: Date format


The funny thing is, Excel recognises these numbers as dates. If I paste one
of the numbers into Excel, then do Format Cell  Date and choose the last
option on the list, Excel will happily turn it into a correct date. To my
thinking, it must therefore be a fairly standard way of formatting a date
and yet I can find nothing about it anywhere. 
 
Very weird. More Googling needed I think.
 
Thanks for all your help.
 
T


--~--~-~--~~~---~--~~
You received this message because you are subscribed to the Google Groups 
cfaussie group.
To post to this group, send email to cfaussie@googlegroups.com
To unsubscribe from this group, send email to [EMAIL PROTECTED]
For more options, visit this group at 
http://groups.google.com/group/cfaussie?hl=en
-~--~~~~--~~--~--~---