DateValue
DateValue(date_str)
Description
Use the DateValue function to convert a date string and returns the result as a Date type. date_str must be a string in the active date format user's current personalization date format.
If the user's Date Format personalization setting is set to DDMMYY (or it is defaulted to this from their browser locale or the system-wide personalization defaults) then the following code returns a Datetime value equal to September 10, 1997.
&DTM = DateValue("10/09/97");
If the user's Date Format personalization setting is set to MMDDYY (or it is defaulted to this from their browser locale or the system-wide personalization defaults) then the same function call returns a value equal to October 9, 1997.
Using this Function in Fields Without a Default Century Setting
This function may derive the wrong century setting if passed a 2-character year and DateValue is executing in a PeopleCode event not associated with a field that has a default century setting.
For example, assume that TEST_DATE is a date field with a default century setting of 10. TEST_FIELD is a field with no default century setting. If the following PeopleCode program is executing in TEST_FIELD, the date will be calculated incorrectly:
TEST_DATE = DateValue("10/13/11");
Though TEST_DATE has a century setting, it isn’t used because the PeopleCode fired in TEST_FIELD. Instead, DateValue uses the 50/50 rule and calculates the year to be 2011 (instead of 1911).
Returns
Returns a Date value
转载于:https://www.cnblogs.com/GoDevil/archive/2009/01/08/1371891.html
- Building Registry Search Collections
- Fix ecqueueinstance Error
- Query看不到的问题!
- MUI全国城市区县级联json转换sql建表
- HashTable 和 NameValueCollection
- cruel用法
- hdu 5147 Sequence II【树状数组/线段树】
- idea 配置为实体类生成序列化uid
- easyui (前后端分离)
- 错误分析:Internal Query Processor Error: The query processor ran out of stack space during query optimiz...
- String,StringBuilder(字符串的缓冲区)
- Multi-shot Pedestrian Re-identification via Sequential Decision Making
- Postman-Pre-request Script
- C# StringBuilder类型
- ES 23 - 检索和过滤的区别 (query vs. filter)
- weui的picker组件截取年月显示
- 全面了解Yonghong X-Suite,企业轻松上手数据分析
- Element-ui表格单选
- cpuid指令——返回处理器的标识和特性信息
- easyui高级控件(三)