From c517f41321dae0d78a18dd4e0048fafa65dfd4e4 Mon Sep 17 00:00:00 2001 From: chinlinlee Date: Sun, 19 Nov 2023 16:08:02 +0800 Subject: [PATCH] feat: add DT transform value for sql --- models/sql/po/utils.js | 7 +++++++ 1 file changed, 7 insertions(+) create mode 100644 models/sql/po/utils.js diff --git a/models/sql/po/utils.js b/models/sql/po/utils.js new file mode 100644 index 00000000..0edd878a --- /dev/null +++ b/models/sql/po/utils.js @@ -0,0 +1,7 @@ +const moment = require("moment"); + +const vrValueTransform = { + "DT": (v) => v ? moment(v, "YYYYMMDDhhmmss.SSSSSSZZ").toISOString(): undefined +}; + +module.exports.vrValueTransform = vrValueTransform; \ No newline at end of file