Notification

This article is about Looker Studio. For Looker documentation, visit https://cloud.google.com/looker/docs/intro.

Požadovaná stránka aktuálně není k dispozici ve vašem jazyce. V dolní části stránky však můžete vybrat jiný jazyk, případně pomocí funkce překladu integrované v prohlížeči Google Chrome jakoukoli stránku okamžitě přeložit do vybraného jazyka.

FORMAT_DATETIME

Converts a date to formatted text.

Sample usage

FORMAT_DATETIME("%c", Order Date)

Syntax

FORMAT_DATETIME(format_string, date_expression)

Parameters

format_string - See Supported Format Elements For DATETIME for a list of format elements that this function supports.

date_expression - a Date or a Date & Time field or expression.

Return data type

Text1

Examples

Example formula Output
FORMAT_DATETIME("%x", DATE "2008-12-25") 12/25/08
FORMAT_DATETIME("%c", DATETIME "2008-12-25 15:30:00") Thu Dec 25 15:30:00 2008
FORMAT_DATETIME("%b-%d-%Y", DATETIME "2008-12-25 15:30:00")

Dec-25-2008

Notes

This function is not available for compatibility mode date types.

  1. Date strings may be interpreted as compatibility mode Date data types. To preserve the specified format, change the field type to Text.

Related resources

Pomohly vám tyto informace?

Jak bychom článek mohli vylepšit?
true
What's new in Looker Studio?

Learn about new features and recent changes. Looker Studio release notes live on Google Cloud.

Search
Clear search
Close search
Main menu
8763361253085313365
true
Prohledat Centrum nápovědy
true
true
true
true
true
102097
false
false