Skip to content
This repository has been archived by the owner on Jul 22, 2022. It is now read-only.

Date format is not changing #330

Open
saikmadana opened this issue Dec 14, 2020 · 1 comment
Open

Date format is not changing #330

saikmadana opened this issue Dec 14, 2020 · 1 comment

Comments

@saikmadana
Copy link

When I try to change the format of the date it is not changing

const DATE = {
  numberFormat: 'mm/dd/yyyy'
}
const xlSheet = new xl.Workbook({
  dateFormat: 'mm/dd/yyyy'
})
const DATE_STYLE = xlSheet.createStyle(DATE)
xlTab.cell(1, 1)  
  .date(each[key.key])
  .style(DATE_STYLE)

Still, the date is appearing like 11-12-2020

Can you please help what are the other changes I need to make.

Thank you...

@nivb52
Copy link

nivb52 commented Jan 6, 2021

try like this -
DATE_STYLE = { numberFormat: 'dd / mm / yyyy' }
.style(DATE_STYLE );

Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants