Excel VBA 中日期格式末尾的“@”符号是什么意思?

what does the "@" sign means in the end of date format in Excel VBA?

Excel VBA 中日期格式末尾的“@”符号是什么意思?

Columns("U:U").NumberFormat = "yyyy-mm-dd hh:mm:ss;@"
Columns("V:V").NumberFormat = "yyyy-mm-dd hh:mm:ss;@"

它有什么作用吗?

如果我没有写 .NumberFormat 有什么区别?

Columns("U:U").NumberFormat = "yyyy-mm-dd hh:mm:ss;
Columns("V:V").NumberFormat = "yyyy-mm-dd hh:mm:ss;

我的其他栏目格式最后都没有那个符号:

Columns("K:K").NumberFormat = "#,##0"        
Columns("L:L").NumberFormat = "General"
Columns("M:M").NumberFormat = "#,##0.00"
Columns("N:N").NumberFormat = "General"
Columns("O:O").NumberFormat = "#,##0.00"

这是因为它是自定义文本 - 日期后跟时间 -,“@”表示文本。 如果你不设置它,就会发生这种情况 Excel 界面如何从 VBA 知道您要做什么?