[#BloombergLP-balber-BerUtil_DateImpUtil-dateToDaysSinceEpoch]
= xref:BloombergLP.adoc[BloombergLP]::xref:BloombergLP/balber.adoc[balber]::xref:BloombergLP/balber/BerUtil_DateImpUtil.adoc[BerUtil&lowbar;DateImpUtil]::dateToDaysSinceEpoch
:relfileprefix: ../../../
:mrdocs:

Convert a date to days relative to the compact&hyphen;binary date epoch&period;

== Synopsis

Declared in `&lt;balber&lowbar;berutil&period;h&gt;`

[source,cpp,subs="verbatim,replacements,macros,-callouts"]
----
static
void
dateToDaysSinceEpoch(
    xref:BloombergLP/bsls/Types/Int64.adoc[bsls::Types::Int64]* daysSinceEpoch,
    xref:BloombergLP/bdlt/Date.adoc[bdlt::Date] const& date);
----

== Description

Load to the specified `daysSinceEpoch` the number of days between the compact&hyphen;binary date epoch and the specified `date`&period; The compact&hyphen;binary date epoch is the date defined by the `k&lowbar;COMPACT&lowbar;BINARY&lowbar;DATE&lowbar;EPOCH` serial date&period; Note that this quantity may be negative if the specified `date` occurs before the compact&hyphen;binary date epoch&period;

== Parameters

[cols="1,4"]
|===
| Name| Description
| *daysSinceEpoch*
| destination for the day count relative to the epoch
| *date*
| date to convert
|===


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