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.

Moderatori: Gurus, Addon Administrators

ashishg
Messaggi: 40
Iscritto il: lun mar 12, 2007 12:19 am

Help: What is code for calling today's date

Messaggio da 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.

Codice: Seleziona tutto

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

Codice: Seleziona tutto

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
Messaggi: 401
Iscritto il: gio set 27, 2007 4:19 pm

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

Messaggio da raybeau528 »

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

Ray
ashishg
Messaggi: 40
Iscritto il: lun mar 12, 2007 12:19 am

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

Messaggio da ashishg »

Thanks. Problem solved. Pls delete this thread as I cannot find a way to do so.
Teknojnky
Messaggi: 5537
Iscritto il: mar set 06, 2005 11:01 pm

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

Messaggio da 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
Messaggi: 18593
Iscritto il: mar giu 10, 2003 7:21 pm

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

Messaggio da 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
Immagine
Immagine
Immagine
How to attach PICTURE/SCREENSHOTS to forum posts
MoDementia
Messaggi: 1321
Iscritto il: gio giu 15, 2006 3:26 pm

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

Messaggio da MoDementia »

Looking for this I think

Codice: Seleziona tutto

    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 ;)
Rispondi