Rainmeter date and time subtraction not working

24 Views Asked by At

I am trying to create a rainmeter skin for the counting streak. Here is my code:

[Rainmeter]
Update=1000

[Variables]
StartDateTime=2024-02-07T17:30:00

[MeasureStreak]
Measure=Calc
Formula=Floor((Now - !StartDateTime) / (24*3600)) ; Calculate streak as number of days since the start date
DynamicVariables=1

[MeasureHours]
Measure=Calc
Formula=(Floor((Now - !StartDateTime) / 3600)) % 24 ; Calculate remaining hours

[MeasureMinutes]
Measure=Calc
Formula=(Floor((Now - !StartDateTime) / 60)) % 60 ; Calculate remaining minutes

[MeterStreak]
Meter=String
MeasureName=MeasureStreak
Text=Streak: [MeasureStreak] days, [MeasureHours] hours, [MeasureMinutes] minutes
FontFace=Arial
FontSize=12
FontColor=255,255,255,255
SolidColor=0,0,0,150
AntiAlias=1
Padding=5,5,5,5

However, the counter is not working and is always counting 0. What is the problem here?

0

There are 0 best solutions below