Jump to main content
  Documentation
Documentation
  1. Home
  2. Function References
  3. Functions
  4. D
  5. dayOfYear
  • Get Started
  • Deployment
  • Database
  • Streaming
  • Migration
  • Maintenance
  • Programming Basics
  • Function References
    • Functions
      • A
      • B
      • C
      • D
        • dailyAlignedBar
        • database
        • date
        • datehour
        • datetime
        • datetimeParse
        • dayOfMonth
        • dayOfWeek
        • dayOfYear
        • daysInMonth
        • decimal32
        • decimal64
        • decimal128
        • decimalFormat
        • decimalMultiply
        • decodeShortGenomeSeq
        • decompress
        • defined
        • deg2rad
        • deleteGroup
        • deleteGroupMember
        • deleteReplicas
        • deleteScheduledJob
        • deleteUser
        • deltas
        • dema
        • demean
        • denseRank
        • deny
        • derivative
        • det
        • diag
        • dict
        • dictUpdate!
        • difference
        • disableActivePartition
        • disableQueryMonitor
        • disableTablePersistence
        • disableTSDBAsyncSorting
        • distance
        • distinct
        • div
        • dividedDifference
        • dot
        • double
        • drop
        • dropAggregator
        • dropColumns!
        • dropDatabase
        • dropDistributedInMemoryTable
        • dropFunctionView
        • dropIPCInMemoryTable
        • dropna
        • dropPartition
        • dropStreamEngine
        • dropStreamTable
        • dropTable
        • duration
      • E
      • F
      • G
      • H
      • I
      • J
      • K
      • L
      • M
      • N
      • O
      • P
      • Q
      • R
      • S
      • T
      • U
      • V
      • W
      • X
      • Y
      • Z
      • Appendix
    • Themes
    • Templates
  • API
  • Plugins
  • Tutorials
  • Release Notes

dayOfYear

Syntax

dayOfYear(X)

Arguments

X is a scalar/vector of type DATE, DATETIME, TIMESTAMP or NANOTIMESTAMP.

Details

Return the day of the year for each element in X.

Examples

dayOfYear(2011.01.01);
// output
1

dayOfYear([2011.12.31,2012.12.31]);
// output
[365,366]

dayOfYear([2012.06.12T12:30:00,2012.07.12T12:35:00]);
// output
[164,194]

Related functions: dayOfMonth, quarterOfYear, monthOfYear, weekOfYear, hourOfDay, minuteOfHour, secondOfMinute, millisecond, microsecond, nanosecond

On this page
  • Syntax
  • Arguments
  • Details
  • Examples
Copyright

Copyright © 2016-2023 DolphinDB, Inc. All rights reserved. 浙ICP备18048711号-3