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.
相当直截了当......我有一个 EntityDataSource ,在 Select 属性中,我正在提取各种字段。其中之一是我希望以“MM/dd/yyyy”格式返回的日期。我怎样才能做到这一点?
这个解决方案适用于我:
cast(it.[interview_start_date] as System.String)
您可以使用 .ToString(Format Here)
DateTime time = EDS.Field; Console.WriteLine(time.ToString(MM/dd/yyyy));