Skip to content

formatDate ​

formatDate(value): string

Defined in: js-xbbg/src/index.ts (declaration: index.d.ts:996)

Format a date-like value to YYYYMMDD (Bloomberg-native).

Accepts Date, ISO 8601 / Bloomberg-native strings, epoch ms, and any duck-typed Luxon-style { toJSDate(): Date }. Strict on ambiguous formats.

Parameters ​

value ​

DateLike

Returns ​

string

Last updated:

xbbg is independent open-source software and is not affiliated with, endorsed by, sponsored by, or approved by Bloomberg Finance L.P.