I would be *very* nervous about using this approach to determine the date from this database. Using your logic the integers below would give the same date ....
<cfoutput> 2 digit year<br> #dateformat(693963, 'dd.mm.yy')#<br> #dateformat(730487, 'dd.mm.yy')#<br> #dateformat(767011, 'dd.mm.yy')#<br> 4 digit year<br> #dateformat(693963, 'dd.mm.yyyy')#<br> #dateformat(730487, 'dd.mm.yyyy')#<br> #dateformat(767011, 'dd.mm.yyyy')#<br> </cfoutput> CF parses the integer by adding the number of days to 1/1/1900 as per the java Date class. The database stores the integer referenced from 1/1/0001. I would be subtracting 693963 from the integers in the database before letting CF parse them. my 2c. On Apr 4, 10:24 am, "Tom MacKean" <[EMAIL PROTECTED]> wrote: > OK. Feeling a bit silly now. > > #dateformat(718167,"d.m.yy")# works a treat. It gives 9.4.66 which is the > same result as Excel (and I assume is correct) > > My confusion initially was that #dateformat(718167,"d.m.yyyy")# gives > 9.4.3866 which didn't look right at all so I thought is wasn't working. The > key is that the year is only two digits. Sorry for wasting everyone's time > :( > > T > > On 4/4/07, Tom MacKean <[EMAIL PROTECTED]> wrote: > > > > > > > > > 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 > > > On 4/3/07, rod higgins <[EMAIL PROTECTED]> wrote: > > > > Trying to create a date of 0001/01/01 is alot of fun in CF - I cant > > > seem to create one using createdate(). I imagine Tom you will have to > > > use something like the code below to generate a reference date to > > > compare the integers against. > > > > <cfset mydate = createdate(1962,2,2)> > > > <cfset refdate = dateadd("d", -716640, mydate)> > > > <cfoutput> > > > #dateformat(refdate, 'yyyy/mm/dd')# > > > </cfoutput> > > > > hth > > > Rod > > > -- > > 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. > > -- > 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.- > Hide quoted text - > > - Show quoted text - --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---