abstract:
INSERT into Archive (title,subtext,article,author,type,time) VALUES ('#title#','#subtext#','#article#','#author#','#type#',#Timeformat(now,'hhmm')#)
As well as putting Timeformat(time,HHMM) and changing the syntax.
Any ideas guys i cant understand why it wont store - the database field is set to time/date.
Cheers
Dave
Hi,
Im developing a content management system for a newspaper and want to store articles, type of article, author, and date and time values when they are input -for search purposes.
Ive tried a number of things but cant get time to store in the format i want it to, the query error states that 'Variable NOW is undefined.'
<cfset time= #now()#>
<cfquery name="add1" datasource="061508ics6dpb">
INSERT into Archive (title,subtext,article,author,type,time) VALUES ('#title#','#subtext#','#article#','#author#','#type#',#time#)
Ive also tried
<cfquery name="add1" datasource="061508ics6dpb">
INSERT into Archive (title,subtext,article,author,type,time) VALUES ('#title#','#subtext#','#article#','#author#','#type#',#Timeformat(now,'hhmm')#)
As well as putting Timeformat(time,HHMM) and changing the syntax.
Any ideas guys i cant understand why it wont store - the database field is set to time/date.
Cheers
Dave |