Jump to main content
  Documentation
Documentation
  1. Home
  2. Function References

    Reference for all built-in functions

  3. Functions
  4. D
  5. dayOfMonth
v1.30.22
Download
  • About DolphinDB
  • Deployment

    Deploy and upgrade DolphinDB on premise or in the cloud

  • Database

    Design and configure DolphinDB databases

  • Streaming

    Publish, subscribe to, and process streaming data

  • Migration

    Import and migrate data from various data sources to DolphinDB databases

  • Maintenance

    Database maintenance and system management

  • Programming Guide

    DolphinDB scripting language and SQL reference

  • Function References

    Reference for all built-in functions

    • Categories
    • Functions
      • A
      • B
      • C
      • D
        • dailyAlignedBar
        • database
        • date
        • datehour
        • datetime
        • datetimeParse
        • dayOfMonth
        • dayOfWeek
        • dayOfYear
        • daysInMonth
        • decimalFormat
        • decompress
        • defined
        • defs
        • deg2rad
        • deleteChunkMetaOnMasterById
        • deleteGroup
        • deleteGroupMember
        • deleteReplicas
        • deleteScheduledJob
        • deleteUser
        • deltas
        • dema
        • demean
        • denseRank
        • deny
        • derivative
        • det
        • diag
        • dict
        • dictUpdate!
        • difference
        • digitize
        • disableActivePartition
        • disableQueryMonitor
        • disableTablePersistence
        • distance
        • distinct
        • div
        • dot
        • double
        • drop
        • dropAggregator
        • dropColumns!
        • dropDatabase
        • dropDistributedInMemoryTable
        • dropFunctionView
        • dropIPCInMemoryTable
        • dropna
        • dropPartition
        • dropStreamEngine
        • dropStreamTable
        • dropTable
        • duration
        • dynamicGroupCumcount
        • dynamicGroupCumsum
      • 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 & Connector

    API in different languages for users to call DolphinDB from their programs

  • Plugins

    Guidance on the use of plugins and plugin development for multiple application scenarios

  • Tutorials

    Tutorials on database concepts and application scenarios

  • Release Notes

    Release notes and compatibility changes for DolphinDB server, plugins and APIs

dayOfMonth

Syntax

dayOfMonth(X)

Arguments

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

Details

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

Return value: an integer

Examples

dayOfMonth(2011.01.01);
// output
1

dayOfMonth([2012.06.12T12:30:00,2012.07.28T12:35:00]);
// output
[12,28]

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

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

Copyright ©2025 DolphinDB, Inc. All rights reserved.