I want to get the date and time of the device i.e. the time and date of that specific region where the app is getting used. Can some one plz help me?
try to install
1 - Install via NPM:
npm install moment -S
2 - Import in your Typescript file:
import moment from ‘moment’;
3 - Use in your Typescript file:
let data = moment().format('YYYYMMDD'); let time = moment().format('HHmmss'); console.log('today is: ', data + ' and time: ', time);
Hope this will help you
it your issue is resolved please mark as solution.