time function datetime_format get error

9 views
Skip to first unread message

术士

unread,
Mar 29, 2020, 5:47:50 AM3/29/20
to gsql-users
CREATE QUERY test_demo(/* Parameters here */) FOR GRAPH traffic {
 
/* Write query logic here */
        STRING d
= datetime_format(now(),
"%Y-%m-%d%");
 
PRINT d;
}


image

how to fix it

Xinyu Chang

unread,
Mar 30, 2020, 12:36:32 PM3/30/20
to 术士, gsql-users
In GSQL, it is required to clearly separate the definition of data structure and running logics.

Please split that line into two lines.

string d;

d = datetime_format....
print....

Thanks.


Xinyu Chang
Director of Customer Solutions
TigerGraph, Inc.


--
Welcome to GSQL-user group.
- our mission is bringing the power of graph databases to everyone www.opengsql.org
- technical resource can be found here https://docs.tigergraph.com/
---
You received this message because you are subscribed to the Google Groups "gsql-users" group.
To unsubscribe from this group and stop receiving emails from it, send an email to gsql-users+...@opengsql.org.
To view this discussion on the web visit https://groups.google.com/a/opengsql.org/d/msgid/gsql-users/57c7de50-0b7f-4f69-be84-7de681e634e4%40opengsql.org.
Reply all
Reply to author
Forward
0 new messages