Cisco Support Community
cancel
Showing results for 
Search instead for 
Did you mean: 
Announcements

Welcome to Cisco Support Community. We would love to have your feedback.

For an introduction to the new site, click here. And see here for current known issues.

New Member

UCCX5, how to SQL insert the timestamp

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

Re: UCCX5, how to SQL insert the timestamp

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

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

2 REPLIES

Re: UCCX5, how to SQL insert the timestamp

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

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

New Member

Re: UCCX5, how to SQL insert the timestamp

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

368
Views
0
Helpful
2
Replies
CreatePlease to create content