Now関数とかで取得した日付をText関数で整形したいとき、少しだけ情報を見つけるのに時間がかかってしまったので、ここにメモ。
Text関数
日付や数値などの書式を指定する関数。
今回の内容は、基本的には↓の公式にほぼ載っている情報なので、こちらもぜひご参照!
![]()

Text 関数 - Power Platform
Text 関数の構文と例を含む参照情報。
表記の言語を指定する
今回情報にたどり着くまでに時間がかかったのが、この言語の指定。
例えば「4月」でもUIによって「4月」や「April」を使い分けたいことがあるんだけど、どうやって指定するのかなかなか見つからず。。。
でようやく見つけたのが、結局上の公式サイトw
Text( Number, DateTimeFormatEnum [, ResultLanguageTag ] )
Text関数の第3引数を指定することで、言語を指定することができる。
月の表示
普通に表示するとこんな感じの「月」。


おしゃれに表示したい場合は「mmm」か「mmmm」を使用する。
省略表記:mmm
日本語だとこんな感じ。


英語だとこんな感じ。


完全表記:mmmm
日本語だとこんな感じで、省略も完全も一緒。


英語だとこんな感じ。


曜日の表示
省略表記:ddd
日本語だとこんな感じ。


英語だとこんな感じ。


完全表記:dddd
日本語だとこんな感じで、月と同様に省略も完全も一緒。


英語だとこんな感じ。


AMやPMを表示する
普通に表示するとと24h表記になる時間、


これを、AM、PMを使いたい場合は「a/p」や「AM/PM」を使用する。
省略:a/p
日本語だとこんな感じ。省略の仕方が雑w


英語だとこんな感じ。


完全:AM/PM
日本語だとこんな感じ。


英語だとこんな感じ。


コメント