cancel
Showing results for 
Search instead for 
Did you mean: 
cancel
Showing results for 
Search instead for 
Did you mean: 

Give current date and time values in value 2Dwidget

SOLVED
Highlighted
Participant

Give current date and time values in value 2Dwidget

hi community, thanks for your help.

how can i give a current date and time values in a value 2D widget, or any other 2Dwidget??

please, i need yor help.

 

1 ACCEPTED SOLUTION

Accepted Solutions

Re: Give current date and time values in value 2Dwidget

Hi @Burubae ,  @

 

there are  a lot of ways to implement this, but the most of them are based on the JavaScipt now() functionality (Date(Date.now())

e.g. to print in the console the complete data is something like :

 

console.info("started $ionicView.afterEnter  at time: "+Date(Date.now()))
// or direct assign to a lable
$scope.view.wdg['label-2'].text= "Current data&time: "+Date(Date.now()));

 

so it will print e.g. to the console:

started $ionicView.afterEnter  at time: Tue Feb 04 2020 11:30:08 GMT+0100 (Central European Standard Time)

 

 One further important question is how to extract the correct data / e.g. the time or only the date or only the day ... etc. where are different methods which are supported by the Date object but all of this you can find in programming forums for javascript general programming e.g.

JavaScript Get Date Methods”,

Getting current date and time in JavaScript

 “https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime

Or https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Date/now

etc... 

View solution in original post

2 REPLIES 2

Re: Give current date and time values in value 2Dwidget

Hi @Burubae ,  @

 

there are  a lot of ways to implement this, but the most of them are based on the JavaScipt now() functionality (Date(Date.now())

e.g. to print in the console the complete data is something like :

 

console.info("started $ionicView.afterEnter  at time: "+Date(Date.now()))
// or direct assign to a lable
$scope.view.wdg['label-2'].text= "Current data&time: "+Date(Date.now()));

 

so it will print e.g. to the console:

started $ionicView.afterEnter  at time: Tue Feb 04 2020 11:30:08 GMT+0100 (Central European Standard Time)

 

 One further important question is how to extract the correct data / e.g. the time or only the date or only the day ... etc. where are different methods which are supported by the Date object but all of this you can find in programming forums for javascript general programming e.g.

JavaScript Get Date Methods”,

Getting current date and time in JavaScript

 “https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Date/getTime

Or https://developer.mozilla.org/de/docs/Web/JavaScript/Reference/Global_Objects/Date/now

etc... 

View solution in original post

Re: Give current date and time values in value 2Dwidget

thank you so much for your help!!!✌️💚👨‍💻💪

Announcements
Topics available:
AR/VR for Data Optimization AR/VR for Security and Control AR/VR for Inspection