Skip to main content
Version: 1.0 (Latest)

FASTBCP_DATEFORMAT

Overview

The FASTBCP_DATEFORMAT environment variable lets you specify a custom format string for converting date values to strings in the output. When not set, FastBCP uses the ISO 8601 default yyyy-MM-dd.

The format string follows .NET standard and custom date/time format patterns.

Syntax

Windows
$env:FASTBCP_DATEFORMAT = "yyyyMMdd"
Linux/macOS
export FASTBCP_DATEFORMAT=yyyyMMdd

Configuration

PropertyValue
TypeFormat string
Defaultyyyy-MM-dd
Applies toAll output formats that serialize date columns as strings (CSV, JSON, etc.)
SinceFastBCP 1.0

Format Examples

Format stringExample output
yyyy-MM-dd (default)2026-06-28
yyyyMMdd20260628
dd/MM/yyyy28/06/2026
MM-dd-yyyy06-28-2026
yyyy/MM/dd2026/06/28

Examples

Compact date format — no separators (PowerShell)

$env:FASTBCP_DATEFORMAT = "yyyyMMdd"

fastbcp -S myserver.database.windows.net `
-d MyDatabase `
-T dbo.MyTable `
--fileoutput "output.csv"

Output column value: 20260628

Compact date format — no separators (Linux/macOS)

export FASTBCP_DATEFORMAT=yyyyMMdd

fastbcp -S myserver.database.windows.net \
-d MyDatabase \
-T dbo.MyTable \
--fileoutput "output.csv"

Output column value: 20260628

Restore default ISO 8601 format

Windows
Remove-Item Env:FASTBCP_DATEFORMAT
Linux/macOS
unset FASTBCP_DATEFORMAT
Copyright © 2026 Architecture & Performance.