Help: What is code for calling today's date

This forum is for questions / discussions regarding development of addons / tweaks for MediaMonkey for Windows 4.

Moderators: Gurus, Addon Administrators

ashishg
Posts: 40
Joined: Mon Mar 12, 2007 12:19 am
Location: India

Help: What is code for calling today's date

Post by ashishg »

Noob alert: please help.

I am trying to write a simple script that will give me play counter per 100 days. I am using it to list my favourite songs. I am currently using LastPlayed so that play count per 100 day at date of last played is computed.

Code: Select all

itm.Custom3 = ((itm.PlayCounter - 1) * 100) / (itm.LastPlayed - itm.DateAdded)
I'd like to be able to us today's date. So code should look something like

Code: Select all

itm.Custom3 = (itm.PlayCounter * 100) / ([b]<today>[/b] - itm.DateAdded)
I think it should be something easy but I can't find in script help file. Thanks.
raybeau528
Posts: 401
Joined: Thu Sep 27, 2007 4:19 pm
Location: Connecticut

Re: Help: What is code for calling today's date

Post by raybeau528 »

You probably need to use the VBscript DATE function and related functions (DateDiff, DatePart, etc).

Ray
ashishg
Posts: 40
Joined: Mon Mar 12, 2007 12:19 am
Location: India

Re: Help: What is code for calling today's date

Post by ashishg »

Thanks. Problem solved. Pls delete this thread as I cannot find a way to do so.
Teknojnky
Posts: 5537
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

Re: Help: What is code for calling today's date

Post by Teknojnky »

you should be able to delete it by editing the initial post and checking the box for delete, but really there is no need as perhaps someone else may have the same question.
Peke
Posts: 17446
Joined: Tue Jun 10, 2003 7:21 pm
Location: Earth
Contact:

Re: Help: What is code for calling today's date

Post by Peke »

I must confess that I do not understand request/question :oops: :-? :(
Best regards,
Peke
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
Image
How to attach PICTURE/SCREENSHOTS to forum posts
MoDementia
Posts: 1321
Joined: Thu Jun 15, 2006 3:26 pm
Location: Geelong, Victoria, Australia

Re: Help: What is code for calling today's date

Post by MoDementia »

Looking for this I think

Code: Select all

    LastExportDate = Cdbl(Now)
but you might have to add/subtract 26k from it to match MM

I have done the code before but can't remember which script :(

Bex knows it off by heart ;)
Post Reply