delphi programming forums mysql charset mget recursive synonimos
free ventrilo servers hosting cs javascript delay python find in list
Back Forum New
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

TOP

it all depends on your DBs date format.  Oracle, for example, requires has a default date format of 01-JAN-09.
If you using oracle, instead of formating your #now()#, just use the oracle function sysdate.  it will give you the same thing.



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

TOP

Back Forum