### THE FORUM IS IN READ-ONLY MODE

This forum is in read-only mode. The new forum is live at https://discourse.openbullet.dev and registrations are open!

# Generate time and date

• Hi,How to generate time and date in millisecond ? I tried some answers which were given before but none of them worked for me . I will appreciate any help.

• For Milliseconds to Seconds:
FUNCTION Compute "<TIME> / 1000" -> VAR "NEWTIME"

For Seconds to Milliseconds:
just do <TIME>000

To make his two methods available to you one with "FUNCTION" compute and one without the "FUNCTION" compute First method:

Loliscript for the first method

#UnixTime FUNCTION CurrentUnixTime -> VAR "TIME"

#to_ms FUNCTION Compute "<TIME>000" -> VAR "NEWTIME"

If you have this time in ms "1598201815000" and you want to check her
go here : https://www.timecalculator.net/milliseconds-to-date

Second Method if you have problem with the first method :

Screenshot one : okay get the currentUnixtime the name of my variable is "date" I think you can do it, I don't need to put the screen back on

Screenshot two :

I replace my date by my date and add 000 for the ms

In fact in the second block we have already finished but if you want to be more precise still put the third block it's precision :

Loliscript for the second method:
#Unixtime_ FUNCTION CurrentUnixTime -> VAR "date"

#Convert_miliseconds FUNCTION Replace "<date[1]>" "<date[1]>000" "<date[1]>" -> VAR "Conv"

#Date_in_ms FUNCTION Compute "<Conv[1]> + 744" -> VAR "DateMS"

!#UnixTime FUNCTION CurrentUnixTime -> VAR "TIME"

!#to_ms FUNCTION Compute "<TIME>000" -> VAR "NEWTIME"

for the check I have this "1598202975744" and this https://www.timecalculator.net/milliseconds-to-date.

If you want more explanation come in private

• @Why001 Thank you Sir