/*************************************************** Created Date: 19 Jul 2013 Created By: Jimmy Xie (Tectura) Helpdesk Ticket#: TB001613 - Accounts Payable Positive Pay Description of Behavior: Format extended date Expected Input: Expected Output: ***************************************************/ public static str dateFormatExtended2Str_DNT(Date _dateValue, DNT_DateFormatExtended _dateFormatExtended, int _separator) { #define.123 (123) #define.132 (132) #define.213 (213) #define.231 (231) #define.312 (312) #define.321 (321) #define.0 (0) #define.2 (2) #define.4 (4) str ret; ; switch(_DateFormatExtended) { case DNT_DateFormatExtended::ddmmyy: ret = date2str(_dateValue,#123,#2,_separator,#2,_separator,#2); break; case DNT_DateFormatExtended::ddmmyyyy: ret = date2str(_dateValue,#123,#2,_separator,#2,_separator,#4); break; case DNT_DateFormatExtended::ddyymm: ret = date2str(_dateValue,#132,#2,_separator,#2,_separator,#2); break; case DNT_DateFormatExtended::ddyyyymm: ret = date2str(_dateValue,#132,#2,_separator,#2,_separator,#4); break; case DNT_DateFormatExtended::mmddyy: ret = date2str(_dateValue,#213,#2,_separator,#2,_separator,#2); break; case DNT_DateFormatExtended::mmddyyyy: ret = date2str(_dateValue,#213,#2,_separator,#2,_separator,#4); break; case DNT_DateFormatExtended::mmyydd: ret = date2str(_dateValue,#231,#2,_separator,#2,_separator,#2); break; case DNT_DateFormatExtended::mmyyyydd: ret = date2str(_dateValue,#231,#2,_separator,#2,_separator,#4); break; case DNT_DateFormatExtended::yyddmm: ret = date2str(_dateValue,#312,#2,_separator,#2,_separator,#2); break; case DNT_DateFormatExtended::yyyyddmm: ret = date2str(_dateValue,#312,#2,_separator,#2,_separator,#4); break; case DNT_DateFormatExtended::yymmdd: ret = date2str(_dateValue,#321,#2,_separator,#2,_separator,#2); break; case DNT_DateFormatExtended::yyyymmdd: ret = date2str(_dateValue,#321,#2,_separator,#2,_separator,#4); break; } return ret; }