[thelist] <cfpop> and date formating

Czechowski, Aaron aczechowski at towson.edu
Tue Jul 18 07:07:42 CDT 2000

	I had similar problems yesterday with CF and dates.  I was trying to
time stamp new db records, as well as set a modified field each time the
record was altered.  what i finally settled on is outputing Now() to a
variable, then DateFormat the variable to another which goes into the DB.  I
found that just putting Now() into the DB didn't work b/c it has the format:
{ts '2000-07-18 07:56:53'} - and only when putting it through the dateformat
function will be usable.  
	I ran into something more along the lines of your problem when I
tried using JS to stamp the date when the form submits, but then i had the
same problem as you describe - I couldn't get the JS date into a format that
CF and/or the DB would recognise.  
	Perhaps instead of using the date that cfpop returns, set a variable
to Now() at the same time you pop the mail, the dateformat that one.  it may
not be exactly the right time, but off by a few seconds if anything....

good luck

aaron  :)

> -----Original Message-----
> From: Daniel J. Cody [mailto:dcody at oracular.com]
> Specifically, CF doesn't seem to want to take a date like it 
> comes back
> from cfpop. For instance, 
> cfpop will return "Mon Jul 17 12:00:00 2000" for its date value.
> However, once you try to run it through a DateFormat or ParseDateTime
> function, CF tells you that you're not working with a valid 
> time format.

More information about the thelist mailing list