How to make Parse UnixTimeToDate (Date Format: Seconds)?

Please tell me how to do it, this is how it looked in the project at Open Bullet 1:

That dropdown is not in original OB1 it’s probably a modded version so I can’t help

Is there a way to compare dates?

You can use C# in OB2, so just look for a snippet on stack overflow to parse 2 dates and then compare them

Got it, Thanks for the answer, unfortunately I don’t know C # :roll_eyes:

Something like this

var date1 = DateTime.Parse(string1);
var date2 = DateTime.Parse(string2);
var firstIsBigger = date1 > date2;

You end up with a boolean so you can use a bool key to check it in a keycheck block

1 Like

can we use this to compare 2 lists and only get the difference between this 2?
for example:
text file2:

the results should only contains “1”

Open a new topic don’t reply under topics about other things please

Convert to seconds with respect to what? To the beginning of the universe? xD
If you just want seconds since Jan 1st 1970 (beinning of unix time) then you just need to use DateToUnixTime

Here’s an example


Seconds parsed convert to date in the format 2021-03-09

thats what i thought lol my head was like ima just not help this one lol

thats just unix use date to unix

  datetime = "2021-03-09"
  format = "yyyy-dd-mm"
  => VAR @dateToUnixTimeOutput

I need to convert the variable to date format
Example: < UnixTimestamp> convert yyyy-dd-mm
Example 2: 1615277498 = 2021-03-09

  unixTime = @youunixtime
  => VAR @unixTimeToDateOutput

there is a block for it


This is not a variable

im fully aware you need to modify the input for you

1 Like