Redivis Documentation
API DocumentationRedivis Home
  • Introduction
  • Redivis for open science
    • FAIR data practices
    • Open access
    • Data repository characteristics
    • Data retention policy
    • Citations
  • Guides
    • Getting started
    • Discover & access data
      • Discover datasets
      • Apply to access restricted data
      • Create a study
    • Analyze data in a workflow
      • Reshape data in transforms
      • Work with data in notebooks
      • Running ML workloads
      • Example workflows
        • Analyzing large tabular data
        • Create an image classification model
        • Fine tuning a Large Language Model (LLM)
        • No-code visualization
        • Continuous enrollment
        • Select first/last encounter
    • Export & publish your work
      • Export to other environments
      • Build your own site with Observable
    • Create & manage datasets
      • Create and populate a dataset
      • Upload tabular data as tables
      • Upload unstructured data as files
      • Cleaning tabular data
    • Administer an organization
      • Configure access systems
      • Grant access to data
      • Generate a report
      • Example tasks
        • Emailing subsets of members
    • Video guides
  • Reference
    • Your account
      • Creating an account
      • Managing logins
      • Single Sign-On (SSO)
      • Workspace
      • Studies
      • Compute credits and billing
    • Datasets
      • Documentation
      • Tables
      • Variables
      • Files
      • Creating & editing datasets
      • Uploading data
        • Tabular data
        • Geospatial data
        • Unstructured data
        • Metadata
        • Data sources
        • Programmatic uploads
      • Version control
      • Sampling
      • Exporting data
        • Download
        • Programmatic
        • Google Data Studio
        • Google Cloud Storage
        • Google BigQuery
        • Embedding tables
    • Workflows
      • Workflow concepts
      • Documentation
      • Data sources
      • Tables
      • Transforms
        • Transform concepts
        • Step: Aggregate
        • Step: Create variables
        • Step: Filter
        • Step: Join
        • Step: Limit
        • Step: Stack
        • Step: Order
        • Step: Pivot
        • Step: Rename
        • Step: Retype
        • Step: SQL query
        • Variable selection
        • Value lists
        • Optimization and errors
        • Variable creation methods
          • Common elements
          • Aggregate
          • Case (if/else)
          • Date
          • DateTime
          • Geography
          • JSON
          • Math
          • Navigation
          • Numbering
          • Other
          • Statistical
          • String
          • Time
      • Notebooks
        • Notebook concepts
        • Compute resources
        • Python notebooks
        • R notebooks
        • Stata notebooks
        • SAS notebooks
        • Using the Jupyter interface
      • Access and privacy
    • Data access
      • Access levels
      • Configuring access
      • Requesting access
      • Approving access
      • Usage rules
      • Data access in workflows
    • Organizations
      • Administrator panel
      • Members
      • Studies
      • Workflows
      • Datasets
      • Permission groups
      • Requirements
      • Reports
      • Logs
      • Billing
      • Settings and branding
        • Account
        • Public profile
        • Membership
        • Export environments
        • Advanced: DOI configuration
        • Advanced: Stata & SAS setup
        • Advanced: Data storage locations
        • Advanced: Data egress configuration
    • Institutions
      • Administrator panel
      • Organizations
      • Members
      • Datasets
      • Reports
      • Settings and branding
    • Quotas and limits
    • Glossary
  • Additional Resources
    • Events and press
    • API documentation
    • Redivis Labs
    • Office hours
    • Contact us
    • More information
      • Product updates
      • Roadmap
      • System status
      • Security
      • Feature requests
      • Report a bug
Powered by GitBook
On this page
  • Current time
  • Format time
  • Parse time
  • New time
  • Time add
  • Time diff
  • Time subtract
  • Time truncate

Was this helpful?

Export as PDF
  1. Reference
  2. Workflows
  3. Transforms
  4. Variable creation methods

Time

Last updated 1 year ago

Was this helpful?

Current time

Returns the current time –>

CURRENT_TIME([@time_zone])

Return type

time

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@time_zone

any of: ACDT, ACST, ACT, ACT, ACWST, ADT, AEDT, AEST, AFT, AKDT, AKST, AMST, AMT, AMT, ART, AST, AST, AWST, AZOST, AZOT, AZT, BDT, BIOT, BIT, BOT, BRST, BRT, BST, BST, BST, BTT, CAT, CCT, CDT, CDT, CEST, CET, CHADT, CHAST, CHOT, CHOST, CHST, CHUT, CIST, CIT, CKT, CLST, CLT, COST, COT, CST, CST, CST, CT, CVT, CWST, CXT, DAVT, DDUT, DFT, EASST, EAST, EAT, ECT, ECT, EDT, EEST, EET, EGST, EGT, EIT, EST, FET, FJT, FKST, FKT, FNT, GALT, GAMT, GET, GFT, GILT, GIT, GMT, GST, GST, GYT, HDT, HAEC, HST, HKT, HMT, HOVST, HOVT, ICT, IDLW, IDT, IOT, IRDT, IRKT, IRST, IST, IST, IST, JST, KALT, KGT, KOST, KRAT, KST, LHST, LHST, LINT, MAGT, MART, MAWT, MDT, MET, MEST, MHT, MIST, MIT, MMT, MSK, MST, MST, MUT, MVT, MYT, NCT, NDT, NFT, NPT, NST, NT, NUT, NZDT, NZST, OMST, ORAT, PDT, PET, PETT, PGT, PHOT, PHT, PKT, PMDT, PMST, PONT, PST, PST, PYST, PYT, RET, ROTT, SAKT, SAMT, SAST, SBT, SCT, SDT, SGT, SLST, SRET, SRT, SST, SST, SYOT, TAHT, THA, TFT, TJT, TKT, TLT, TMT, TRT, TOT, TVT, ULAST, ULAT, UTC, UYST, UYT, UZT, VET, VLAT, VOLT, VOST, VUT, WAKT, WAST, WAT, WEST, WET, WIT, WST, YAKT, YEKT

false

(UTC (default))

Format time

Returns a formatted string from a time –>

FORMAT_TIME(@format_string, @time_expression)

Return type

string

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@time_expression

true

-

@format_string

true

(e.g., %H:%M:%S)

Parse time

[@safe]PARSE_TIME(@format_string, @time_string)

Return type

time

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@time_string

true

-

@format_string

true

(e.g., %H:%M:%S)

@safe

true

-

New time

TIME(@hour, @minute, @second)

Return type

time

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@hour

true

-

@minute

true

-

@second

true

-

Time add

TIME_ADD(@time_expression, INTERVAL @integer_expression @time_part)

Return type

time

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@integer_expression

true

-

@time_part

any of: hour, minute, second, millisecond, microsecond

true

((e.g., hours))

@time_expression

true

-

Time diff

TIME_DIFF(@time_expression, @time_expression_2, @time_part)

Return type

integer

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@time_expression_2

true

-

@time_expression

true

-

@time_part

any of: hour, minute, second, millisecond, microsecond

true

((e.g., hours))

Time subtract

TIME_SUB(@time_expression, INTERVAL @integer_expression @time_part)

Return type

time

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@integer_expression

true

-

@time_part

any of: hour, minute, second, millisecond, microsecond

true

((e.g., days))

@time_expression

true

-

Time truncate

TIME_TRUNC(@time_expression, @time_truncate_part)

Return type

time

Parameters

Name
Type
Allowed values
Required
Placeholder (in UI)

@time_expression

true

-

@time_truncate_part

any of: hour, minute, second, millisecond, microsecond

true

((e.g., hours))

or

any

any

More details about format strings

Parses a time from a string –>

or

any

any

any

More details about format strings

Constructs a time from an hour, minute, and second –>

or

any

or

any

or

any

Add a period of time to a time –>

or

any

or

any

Calculate distance between two times –>

or

any

or

any

Subtract a period of time from a time –>

or

any

or

any

Truncates a time to the nearest boundary –>

or

any

learn more
learn more
here
learn more
here
learn more
learn more
learn more
learn more
learn more
enum
variable
literal
time
literal
string
variable
literal
string
literal
string
boolean
boolean
variable
literal
integer
variable
literal
integer
variable
literal
integer
variable
literal
integer
enum
variable
literal
time
variable
literal
time
variable
literal
time
enum
variable
literal
integer
enum
variable
literal
time
variable
literal
time
enum