add month/year to drop-down list box

drop-down list添加日期

/* Add Month/Year to Card Expriry Month*/

Local Field &fld = GetField();

Local date &curDate = %Date;

Local date &endDate = AddToDate(&curDate, 5, 0, 0);

Local string &monYear;

&fld.ClearDropDownList();

/*

Local number &num = 1;

While &curDate <= &endDate

Local string &i = NumberToDisplayString("%", &num);

&monYear = DateTimeToLocalizedString(&curDate, "MMM/y");

&fld.AddDropDownItem(&i, Rept(Char(9), &num) | &monYear);

&curDate = AddToDate(&curDate, 0, 1, 0);

&num = &num + 1;

End-While;

*/

Local array of string &aryS_MthYr = CreateArrayRept("", 0);

While &curDate <= &endDate

/*y一定要小写,大写就不是"2017"这样的格式了,暂时不知原因,求解*/

&monYear = DateTimeToLocalizedString(&curDate, "MMM/y");

&aryS_MthYr.Push(&monYear);

&curDate = AddToDate(&curDate, 0, 1, 0);

End-While;

Local array of number &aryNbr_TabNumber = CreateArrayRept(0, 0);

Local number &nbrMaxValue = &aryS_MthYr.Len;

Local number &n;

For &n = 1 To &aryS_MthYr.Len

&aryNbr_TabNumber.Push(&nbrMaxValue);

Local string &i = NumberToDisplayString("%", &n);

&fld.AddDropDownItem(&i, Rept(Char(9), &aryNbr_TabNumber [&n]) | &aryS_MthYr [&n]);

&nbrMaxValue = &nbrMaxValue - 1;

End-For;

时间: 2024-10-12 21:30:10

add month/year to drop-down list box的相关文章

Oracle 12C 新特性之表分区带 异步全局索引异步维护(一次add、truncate、drop、spilt、merge多个分区)

实验准备:-- 创建实验表CREATE TABLE p_andy(ID number(10), NAME varchar2(40))PARTITION BY RANGE (id)(PARTITION p1 VALUES LESS THAN (10),PARTITION p2 VALUES LESS THAN (20));Table created.-- 查看现在表的分区:SQL> col table_name for a25col partition_name for a25select tab

[转]js add month 加n月

本文转自:http://stackoverflow.com/questions/5645058/how-to-add-months-to-a-date-in-javascript/5645126 I took a look at the datejs and stripped out the code necessary to add months to a date handling edge cases (leap year, shorter months, etc): Date.isLea

数据定义: CREATE、DROP、ALTER

1 CREATE DATABASE 句法 2 3 CREATE DATABASE [IF NOT EXISTS] db_name 4 5 CREATE DATABASE 以给定名字创建一个数据库.允许的数据库名规则在章节 6.1.2 数据库.表.索引.列和别名 中被给出. 如果数据库已经存在,并且你没有指定 IF NOT EXISTS,这时会产生一个错误. 6 7 在 MySQL 中,数据库以包含数据库表对应文件的目录实现的.因为数据库在初始创建时没有表,所以 CREATE DATABASE 语

poj 1442 -- Black Box

Black Box Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7183   Accepted: 2920 Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empt

[ACM] POJ 1442 Black Box (堆,优先队列)

Black Box Time Limit: 1000MS   Memory Limit: 10000K Total Submissions: 7099   Accepted: 2888 Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empt

Black Box--[优先队列 、最大堆最小堆的应用]

Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i equals 0. This Black Box processes a sequence of commands (transactions). There are t

STL--H - Black Box(两个优先队列,求第k小的值)

H - Black Box Time Limit:1000MS     Memory Limit:10000KB     64bit IO Format:%I64d & %I64u Submit Status Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black

poj1442 Black Box【优先队列,定义两个队列】

Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i equals 0. This Black Box processes a sequence of commands (transactions). There are t

【POJ1442】【Treap】Black Box

Description Our Black Box represents a primitive database. It can save an integer array and has a special i variable. At the initial moment Black Box is empty and i equals 0. This Black Box processes a sequence of commands (transactions). There are t