Help: What is code for calling today's date

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

Moderator: Gurus

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 » Wed Jan 14, 2009 9:36 am

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 » Wed Jan 14, 2009 11:55 am

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 » Wed Jan 14, 2009 4:41 pm

Thanks. Problem solved. Pls delete this thread as I cannot find a way to do so.

Teknojnky
Posts: 5533
Joined: Tue Sep 06, 2005 11:01 pm
Contact:

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

Post by Teknojnky » Wed Jan 14, 2009 4:54 pm

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: 12495
Joined: Tue Jun 10, 2003 7:21 pm
Location: Serbia
Contact:

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

Post by Peke » Wed Jan 14, 2009 8:00 pm

I must confess that I do not understand request/question :oops: :-? :(
Best regards,
Pavle
MediaMonkey Team lead QA/Tech Support guru
Admin of Free MediaMonkey addon Site HappyMonkeying
Image
Image
How to add SCREENSHOTS to forum

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 » Thu Jan 15, 2009 1:41 am

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