Notification

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

Trang bạn đã yêu cầu hiện không có sẵn bằng ngôn ngữ của bạn. Bạn có thể chọn ngôn ngữ khác ở cuối trang hoặc dịch nhanh mọi trang web sang ngôn ngữ mà bạn chọn bằng cách sử dụng tính năng dịch được tích hợp sẵn trong Google Chrome.

PARSE_DATE

Converts text to a date.

Sample usage

PARSE_DATE("%x", DateText)

Syntax

PARSE_DATE(format_string, text)

Parameters

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

text - a text representation of a date.

Return data type

Date

Example

In this example, DateText is a field containing a text date. The result of applying PARSE_DATE with the correct format_string is a Date value.

Example formula Input Output
PARSE_DATE("%d/%m/%Y", DateText) 25/12/08 2008-12-25

Notes

When using PARSE_DATE, keep the following in mind:

  • Unspecified fields. Any unspecified field is initialized from 1970-01-01.
  • Case insensitive names. Names, such as Monday, February, and so on, are case insensitive.
  • Whitespace. One or more consecutive white spaces in the format string matches zero or more consecutive white spaces in the date string. In addition, leading and trailing white spaces in the date string are always allowed -- even if they are not in the format string.
  • Format precedence. When two (or more) format elements have overlapping information (for example both %F and %Y affect the year), the last one generally overrides any earlier ones.
This function supports format elements, but does not have full support for %Q, %a, %A, %g, %G, %j, %u, %U, %V, %w, and %W.

Thông tin này có hữu ích không?

Chúng tôi có thể cải thiện trang này bằng cách nào?
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
12186268011067566526
true
Tìm kiếm trong Trung tâm trợ giúp
true
true
true
true
true
102097
false
false