こんにちは。
Excel内で「yy-mm-dd」(文字列)表記になっている
列を全て「yyyy/mm/dd」表記(数値)にしたいです。
※手動では<列ごと選択→「データ」タブ→「区切り位置」→完了ボタン押下
という流れですが、なるべく「クリック」アクティビティを使用したくありません。
Excelの質問かもしれませんが、分かる方いらっしゃったら教えてください。よろしくお願いいたします。
こんにちは。
Excel内で「yy-mm-dd」(文字列)表記になっている
列を全て「yyyy/mm/dd」表記(数値)にしたいです。
※手動では<列ごと選択→「データ」タブ→「区切り位置」→完了ボタン押下
という流れですが、なるべく「クリック」アクティビティを使用したくありません。
Excelの質問かもしれませんが、分かる方いらっしゃったら教えてください。よろしくお願いいたします。
Hi @peanuts
Use this expression in the Assign activity inside the For each Row in Data Table
Try this expression
Cdate(Row("ColumnNameOrIndex").Tostring).Tostring("yyyy/MM/dd")
Or
DateTime.ParseExact(Row("ColumnNameOrIndex").ToString,("yy-MM-ddd"),Globalization.CultureInfo.InvariantCulture).ToString("yyyy/MM/dd”)
Regards
Gokul
Hi @peanuts
You can try with Change cell type Activity and here is llink you can go through the document as well as the video
Hope this Helps
Regards
Sudharsan
こんにちは
例えば以下のような”列名”という列があった場合
以下で変換可能です。
"列名"の部分を実際の列の名前に変更すると良いかと思います。以下サンプルです。
Sequence3.xaml (9.6 KB)
@Gokul001
Thank you very much for your advice.
Regards
peanuts
@Sudharsan_Ka
Thank you very much for your advice.
I downloaded that activity package.Thanks.
Regards
peanuts
@Yoichi 様
列の途中に空白がある場合、
エラー(「文字列参照が文字列のインスタンスに設定されていません。」)
と出ました。
解決方法を教えていただけませんでしょうか。
申し訳ありません。よろしくお願いいたします。
こんにちは
取り急ぎ以下の様に条件分岐を入れてみてください。
条件式は
DateTime.TryParseExact(CurrentRow("列名").ToString,"yy-MM-dd",System.Globalization.CultureInfo.InvariantCulture,System.Globalization.DateTimeStyles.None,New DateTime)
を試してみてください。
This topic was automatically closed 3 days after the last reply. New replies are no longer allowed.