Jump to content
Sign in to follow this  
xdp22

Calculate how much days left to date

Recommended Posts

xdp22

Hello, can someone help me with "XXX Days left to date - 17.09.2011"

I tried :

$data = "17.09.2011"

$z = StringSplit( $data, ".")

$dzien = $z[1]
$miesiac = $z[2]
$rok = $z[3]


$dniu = $dzien - @MDAY
$miesiaca = $miesiac - @MON
$roku = $rok - @YEAR

But don't know what next

Edited by xdp22

Share this post


Link to post
Share on other sites
hannes08

Hi xdp22,

you can use _DateDiff() to calculate the difference.

:mellow:


Regards,Hannes[spoiler]If you can't convince them, confuse them![/spoiler]

Share this post


Link to post
Share on other sites
UEZ

Look in the help file:

#include <Date.au3>

$iDateCalc = _DateDiff( 'd', _NowCalc(), "2011/09/17 00:00:00")
MsgBox( 4096, "", "Days left to 2011/09/17: " & $iDateCalc)

Br,

UEZ


Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Share this post


Link to post
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
Sign in to follow this  

×

Important Information

We have placed cookies on your device to help make this website better. You can adjust your cookie settings, otherwise we'll assume you're okay to continue.