[thesite] Tips Database
Seth Bienek
seth at sethbienek.com
Wed Jul 25 16:07:50 CDT 2001
> especially if the format changed in the middle.
The format changes at message number 11480, to be exact. :)
This is what I did to parse out the dates (not sure if it's any help to you):
<!--- If the message number is less than 11480 --->
<cfif getmessage.messageid LT 11480>
<!--- Treat the hdr_date field as a list delimited by spaces. The month is the third list element, the date is the 4th element, and the year is the 2nd element. --->
<cfset MessageDate = DateFormat("#listgetat(getmessage.hdr_date, 3, " ")# #listgetat(getmessage.hdr_date, 4, " ")#, #listgetat(getmessage.hdr_date, 2, " ")#", "MMMM dd, yyyy")>
<!--- If the message number is greater than 11480 --->
<cfelse>
<!--- Same as above, but the order of the elements in the list is different. --->
<cfset MessageDate = DateFormat("#listgetat(getmessage.hdr_date, 2, " ")# #listgetat(getmessage.hdr_date, 3, " ")#, #listgetat(getmessage.hdr_date, 5, " ")#", "MMMM dd, yyyy")>
</cfif>
Does that make sense? It's not so much work to parse the data out, it's just a pain in the ass to do it every time you need the info, and it's not feasible for querying purposes..
Seth
"If you're ever in an elite paratrooper group, on a secret mission, and your parachute doesn't open, I don't think anyone would blame you if you scream." -Keith Sanvidge
-----------------------------------
Seth Bienek
Digitaris Technologies, Inc.
tel (972) 690-4131, ext. 103
fax (972) 690-0617
icq 7673959
-----------------------------------
More information about the thesite
mailing list