[#BloombergLP-bdlt-Datetime-setYearMonthDay]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/bdlt.adoc[bdlt]::xref:BloombergLP/bdlt/Datetime.adoc[Datetime]::setYearMonthDay
:relfileprefix: ../../../
:mrdocs:

Set the &quot;date&quot; part of this object to have the value represented by the specified `year`, `month`, and `day` attribute values&period; The behavior is undefined unless `year`, `month`, and `day` represent a valid `Date` value (i&period;e&period;, `true &equals;&equals; Date&colon;&colon;isValidYearMonthDay(year, month, day)`)&period; Note that this method has no effect on the &quot;time&quot; part of this object&period;

== Synopsis

Declared in `&lt;bdlt&lowbar;datetime&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
void
setYearMonthDay(
    int year,
    int month,
    int day);
----


[.small]#Created with https://www.mrdocs.com[MrDocs]#
