本文介绍了如何格式化从SPServices.SPFilterDropdown返回的日期的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我正在使用SPServices.SPFilterDropdown填充查找列下拉列表.

I'm using SPServices.SPFilterDropdown to populate a lookup column drop-down.

结果以以下格式返回:YYYY-MM-DD hh:mm:ss.

The results are returned in this format: YYYY-MM-DD hh:mm:ss.

如何使用completefunc将结果格式化为MM-DD-YYYY?

How can I use the completefunc to format the results as MM-DD-YYYY?

谢谢.

推荐答案

我们可以使用具有以下公式的计算列将日期和时间格式更改为"MM-DD-YYYY".

=TEXT(time,"MM-DD-YYYY")



尽管我们不能使用查找列从计算列中获取信息,但是我们可以使用计算列中的静态名称(relationshipListColumn) SPServices.SPFilterDropdown函数. 之后,从SPServices.SPFilterDropdown返回的日期的格式将为"MM-DD-YYYY".

Although we cannot use lookup column to get information from the calculated column, we can use the StaticName of the calculated column (relationshipListColumn) in the SPServices.SPFilterDropdown function. After that, the format of the date returned from the SPServices.SPFilterDropdown will be the "MM-DD-YYYY".

此处是一个供您参考的演示:





最好的问候,

张琳达


这篇关于如何格式化从SPServices.SPFilterDropdown返回的日期的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!

10-31 13:31