06-13-2009 10:00 AM - edited 03-14-2019 04:12 AM
Hi,
I want to insert the current time into database no luck with the below syntax. name field is okay but I guess there is something different way to handle the timestamp.
!
set get_timestamp=T[now]
db write(sql insert (name,timestamp) values ($name,$get_timestamp))
!
database field definition,
-name=char(10)
-timestamp=timestamp(8)
!
Advise please how to achieve,
Thanks in advance,
Solved! Go to Solution.
06-14-2009 05:03 AM
In your db Write step use this as your sql statment:
insert into TABLENAME (name, timestamp) values($name, getdate())
06-14-2009 05:03 AM
In your db Write step use this as your sql statment:
insert into TABLENAME (name, timestamp) values($name, getdate())
06-14-2009 05:46 AM
Thanks Ed, it works perfect after change the database column attribute to 'datetime' with your syntax.
Discover and save your favorite ideas. Come back to expert answers, step-by-step guides, recent topics, and more.
New here? Get started with these tips. How to use Community New member guide