Allison-E opened a new pull request, #1138:
URL: https://github.com/apache/age/pull/1138

   I've begun implementing Cypher's temporal functions in AGE, beginning with 
[date()](https://neo4j.com/docs/cypher-manual/current/functions/temporal/#functions-date).
   
   Here it is in action.
   ```sql
   SELECT * FROM cypher('graph', $$
       RETURN date()
   $$) as (today agtype);
       today     
   --------------
    "2023-08-13"
   (1 row)
   ```
   
   It could also be converted to PostgreSQL's `date` type, but the record 
returned by AGE must first be converted to any of PostgreSQL's character types 
(`char`, `varchar`, or `text`).
   ```sql
   SELECT TO_DATE(today, 'YYYY/MM/DD') FROM cypher('graph', $$
       RETURN date()
   $$) as (today text);
   --
   -- or
   --
   SELECT today::date FROM cypher('graph', $$
       RETURN date()
   $$) AS (today varchar(255));
   ```
   
   ### Limitations
   Although the `date()` function in Cypher accepts an optional `zone` 
parameter to specify what timezone to return, it isn't implemented here yet. 
Currently, the local time zone is returned. Hopefully, that will be implemented 
soon.


-- 
This is an automated message from the Apache Git Service.
To respond to the message, please log on to GitHub and use the
URL above to go to the specific comment.

To unsubscribe, e-mail: [email protected]

For queries about this service, please contact Infrastructure at:
[email protected]

Reply via email to