File

datapoints-export-selector/datapoints-export-selector-modal/datapoints-export-selector-file-exporter/utils.service.ts

Index

Methods

Methods

getFormattedDateRange
getFormattedDateRange(fromDate: string, toDate: string)

Formats a date range into a specific string format, handling UTC dates correctly.

Example :
     where d=day, m=month, y=year, h=hour, m=minute

Example

Example :
const fromDate = "2023-12-04T12:40:00.000Z";
const toDate = "2023-12-06T23:50:00.000Z";
const formattedRange = getFormattedDateRange(fromDate, toDate);
console.log(formattedRange); // Output: "04dec231240-06dec232350"
Parameters :
Name Type Optional Description
fromDate string No
  • The start date in ISO format (e.g., "2023-12-04T12:40:00.000Z")
toDate string No
  • The end date in ISO format (e.g., "2023-12-06T23:50:00.000Z")
Returns : string

A string representing the date range in the format "ddmmmyyhhmm-ddmmmyyhhmm" where d=day, m=month, y=year, h=hour, m=minute

Example

Example :
const fromDate = "2023-12-04T12:40:00.000Z";
const toDate = "2023-12-06T23:50:00.000Z";
const formattedRange = getFormattedDateRange(fromDate, toDate);
console.log(formattedRange); // Output: "04dec231240-06dec232350"
transformDataStructure
transformDataStructure(data: SourceItem[])
Parameters :
Name Type Optional
data SourceItem[] No
Returns : TransformedData

results matching ""

    No results matching ""