<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # 組件源碼 ``` /** * <b>方法描述:</b> 格式化日期 <br/> * <b>創建者:</b> admin <br/> * <b>創建時間:</b> 2018-05-08 17:07:19 <br/> * * @param sdate * 入參|輸入日期/時間串|{@link java.lang.String} * @param format * 入參|輸出格式|{@link java.lang.String} * @param outdate * 出參|輸出字符串|{@link java.lang.String} * @return -1 異常<br/> * 0 失敗<br/> * 1 成功<br/> */ @Component(label = "格式化日期", style = "判斷型", type = "同步組件", comment = "格式化日期", version = "1.0.0", deprecated = false, author = "admin", date = "2018-05-08 05:07:19") @InParams(param = { @Param(name = "sdate", comment = "輸入日期/時間串", type = java.lang.String.class), @Param(name = "format", comment = "輸出格式", type = java.lang.String.class) }) @OutParams(param = { @Param(name = "outdate", comment = "輸出字符串", type = java.lang.String.class) }) @Returns(returns = { @Return(id = "-1", desp = "異常"), @Return(id = "0", desp = "失敗"), @Return(id = "1", desp = "成功") }) public static ResultBase P_dateFormat(String sdate, String format) { if (sdate == null || sdate.length() < 6) return ResultBase.newFailureResult("TPTD1007", "輸入日期不能為空,且不低于6位:" + sdate); if (StringUtil.isBlank(format)) return ResultBase.newFailureResult("TPTD1007", "日期輸出格式不能為空"); sdate = sdate.replaceAll("-", ""); sdate = sdate.replaceAll("/", ""); sdate = sdate.replaceAll(":", ""); sdate = sdate.replaceAll(" ", ""); try { String strInFmt = (sdate.length() == 8) ? "yyyyMMdd" : (sdate .length() == 6) ? "HHmmss" : "yyyyMMddHHmmss"; SimpleDateFormat fmtIn = new SimpleDateFormat(strInFmt); Date date = fmtIn.parse(sdate); SimpleDateFormat fmtOut = new SimpleDateFormat(format); return ResultBase.newSuccessResult(fmtOut.format(date)); } catch (Exception ex) { AppLog.error(ex); return ResultBase.newExceptionResult("TPTD1008", "格式化日期異常:輸入日期:"+sdate+",輸出格式:"+format); } } ``` # 交易中組件使用方式 ![](https://img.kancloud.cn/80/9a/809ac9fd17108431aceceec5c03a4b99_1870x892.png) # 參數說明及示例 ## 入口參數 輸入日期/時間串:輸入一個日期格式的字符串,時間之間用`-、/、:、空格`隔開,示例: `"2020-12-15"` 輸出格式:格式化時間的格式,示例: `"yyyy/MM/dd"` ## 出口參數 輸出字符串:根據輸入參數返回轉換后的時間字符串,示例: `__INNER__["result"]`
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看