Date larger or smaler

Get help with using AutoHotkey (v1.1 and older) and its commands and hotkeys
dellarocco88
Posts: 35
Joined: 07 Apr 2022, 01:34

Date larger or smaler

03 May 2022, 01:46

Trying to make a some text pop up if todays date is over or under a spec date.

Can someone help me get this right? :)

Look here:

Code: Select all

FormatTime, Today, Today, yyyyMMdd
Date_1 := 20220501
Date_2 := 20220510

If(Today >= Date_1 && Today <= Date_2)
	{
	Gui, Font
	Gui, Font, s10
	Gui, Add, Text, x20 y250, Post this text!! 
	return
	}
[Mod edit: [code][/code] tags added.]
AHKStudent
Posts: 1472
Joined: 05 May 2018, 12:23

Re: Date larger or smaler

03 May 2022, 02:00

your code works for me

Code: Select all

FormatTime, Today, Today, yyyyMMdd
Date_1 := 20220501
Date_2 := 20220510

If(Today >= Date_1 && Today <= Date_2)
{
MsgBox yes
}

ExitApp

Return to “Ask for Help (v1)”

Who is online

Users browsing this forum: Google [Bot], peter_ahk and 384 guests