# “May 1, 2023”といったCharacter型のデータをDate型のデータに変換すると、 “2023-01-20”という間違った日付に変換される

**URL:** <https://community-ja.exploratory.io/t/topic/950>\
**Category:** その他\
**Created:** [2023 年 6 月 19 日午後 10:28 UTC](https://community-ja.exploratory.io/t/topic/950 "2023-06-19T22:28:08Z")\
**Posts on this page:** 1\
**Page:** 1

<div class="post-metadata">

**Author:** ![Ikuya\_Murasato](https://community-ja.exploratory.io/user_avatar/community-ja.exploratory.io/ikuya_murasato/32/18_2.png) [@Ikuya\_Murasato](https://community-ja.exploratory.io/u/Ikuya_Murasato)\
**Post date:** [2023 年 6 月 19 日午後 10:28 UTC](https://community-ja.exploratory.io/t/topic/950/1 "2023-06-19T22:28:08Z")

</div>

例えば“May 1, 2023”のようなCharacter型の日付を表す文字列があったとします。

 ![image](https://community-ja.exploratory.io/uploads/default/original/2X/c/c21a79864ac8b5a8303f457a6b83b8062d58624e.png)

以下のように、列ヘッダーメニューから日付に変換しようとすると、

 ![image](https://community-ja.exploratory.io/uploads/default/original/2X/2/26e27a36d6aefbcda1e43fd25971d3238bb3aa79.png)

“2023-01-20”という誤ったData型の値に変換されることがあります。

 ![image](https://community-ja.exploratory.io/uploads/default/original/2X/c/c4ac47cecb31fd170d1d6a60cca848ba1c38b22f.png)

このようなときには、以下のように引数のlocaleに"en\_US.UTF-8"を選択すると、正しい結果"2023-05-01" が表示されます。

 ![image](https://community-ja.exploratory.io/uploads/default/original/2X/4/4015c2512f40db4f1f06bbee9c8bc4ad069fd1ce.png)
