dbAsDate {rpostgis} | R Documentation |
Converts to timestamp.
Description
Convert a date field to a timestamp with or without time zone.
Usage
dbAsDate(conn, name, date = "date", tz = NULL, display = TRUE, exec = TRUE)
Arguments
conn |
A connection object. |
name |
A character string specifying a PostgreSQL table name. |
date |
A character string specifying the date field. |
tz |
A character string specifying the time zone, in
|
display |
Logical. Whether to display the query (defaults to
|
exec |
Logical. Whether to execute the query (defaults to
|
Value
If exec = TRUE
, returns TRUE
if the
conversion was successful.
Author(s)
Mathieu Basille mathieu@basille.org
See Also
The PostgreSQL documentation: http://www.postgresql.org/docs/current/static/datatype-datetime.html
Examples
## Example uses a dummy connection from DBI package
conn <- DBI::ANSI()
dbAsDate(conn, name = c("schema", "table"), date = "date", tz = "GMT",
exec = FALSE)
[Package rpostgis version 1.5.1 Index]