14 lines
451 B
TypeScript
14 lines
451 B
TypeScript
import moment from "moment";
|
|
import { Transaction } from "../models";
|
|
|
|
export function convertDateArray(arr1:any):any{
|
|
let arr = [];
|
|
for (let index = 0; index < arr1.length; index++) {
|
|
let element:Transaction = arr1[index];
|
|
let e:any = element;
|
|
e.Date2 = moment(element.Date).format("YYYY-MM-DD HH:MM")
|
|
console.log(moment(element.Date).format("YYYY-MM-DD HH:MM"))
|
|
arr[index] = e;
|
|
}
|
|
return arr;
|
|
} |