cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
635
Views
0
Helpful
2
Replies

UCCX5, how to SQL insert the timestamp

cjrchoi11
Level 1
Level 1

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,

1 Accepted Solution

Accepted Solutions

villarrealed
Level 1
Level 1

In your db Write step use this as your sql statment:

insert into TABLENAME (name, timestamp) values($name, getdate())

View solution in original post

2 Replies 2

villarrealed
Level 1
Level 1

In your db Write step use this as your sql statment:

insert into TABLENAME (name, timestamp) values($name, getdate())

Thanks Ed, it works perfect after change the database column attribute to 'datetime' with your syntax.