Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
这是我现在的代码:
Sub Page_Load lbl1.Text="The date and time is " & now() End Sub
我想修改now()为只显示时间,不显示日期。我该怎么做呢?
now()
应该是
Sub Page_Load lbl1.Text = String.Format("The date and time is {0:t}", DateTime.Now) End Sub
或{0:T}用于“长时间模式”。这是一个模式列表。
{0:T}