DateUtils - example


#1

Below are blocks that show how to use com.appybuilder.DateUtils extensions to see how many Days, Hours, Minutes till New Year (or any other day) :smile: are left from current date/time.


How to Hide/Disable Something for xTime using the clock sensor?
How to disable the button for 2 hours
Christmas Countdown
Clock in screen
#2

Hi, Mr. Hossein. I need to record time down to millisecond (ms). Is it possible to use this extension?


#3

@Ronin Yes. Use .SSS like this: yyyy-MM-dd HH:mm:ss.SSS


#4

@Ronin BTW, you can get rid of Mr. :slight_smile:


#5

Awesome… Ok then, thank you, Hossein…:grin:


#6

Hi Mr. Hossein, I have a problem with the DataUtils extension, the count of the days is not separated from the comma as in its image, in my case they are represented in this way … (5 22 42 9) and consequently not I can select index 1 because it gives me a list length error = 0.
How can I solve?


#7

@yuri_conte Please post screenshot of your blocks


#8

he sequence of the blocks are the same but the result is different


#9

You do’n’t need “list fro csv row”. Remove that. You should okay


#10

But if I wanted to have as the text in the label only the number of days without hours and minutes how can I do it?

This is the result.


#11

I solved with this trick …


#12

I solved this … Thanks for your help.


#13

Is it possible to count the number of day since someone is born ?
I made this code but the number of day the apps give me it’s 9111 and the number of days since someone born on the 26 october 1993 is 8897 days

I try many option like think in reverse 26 october approximately 66 days then it’s will 7 march.


#14

You only have to change mm by MM