#1 2015-08-31 20:24:18

Nelson
Member
Registered: 2015-04-21
Posts: 21

NeoPlugins - npEncodeDateTime not working?

Hi,

I'm trying to use some date/time capabilities of npUtil but I'm not getting good results and I just tested this:

npEncodeDateTime "[Year]" "[MonthNum]" "[DayNum]" "[Hour]" "[Minute]" "[Second]" "00" "[Result]"
alertbox "" "[Result]"

And its giving me:

Capture.png

I think this is not the correct behavior, Am I right?

Regards.

Offline

#2 2015-08-31 21:58:24

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: NeoPlugins - npEncodeDateTime not working?

Hello Nelson,

What's wrong to you?

Offline

#3 2015-08-31 22:05:16

Nelson
Member
Registered: 2015-04-21
Posts: 21

Re: NeoPlugins - npEncodeDateTime not working?

I thought the process to ENCODE a date would turn something like: 1987-03-29 into 2265123, you know like DateToNum sort of thing...
Maybe I'm wrong If that's the way its supposed to work that I just apologize... smile

Offline

#4 2015-08-31 22:21:35

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: NeoPlugins - npEncodeDateTime not working?

Hello Nelson,

Don't worry. In fact we can use the npEncodeDateTime action to prepare certain value (a "Delphi" datetime string, stored in the result variable) in order to do later two possible things: just use the value like you do above, for example, to show the datetime in an alertbox, or, more commonly, to be use it with other plugin related actions, in order to compare dates, increment days, get number of between days, etc.

The npWeeksBetween action, for example, offer us a sample of the npEncodeDateTime use.

Offline

#5 2015-09-01 19:11:44

Nelson
Member
Registered: 2015-04-21
Posts: 21

Re: NeoPlugins - npEncodeDateTime not working?

David wrote:

Hello Nelson,

Don't worry. In fact we can use the npEncodeDateTime action to prepare certain value (a "Delphi" datetime string, stored in the result variable) in order to do later two possible things: just use the value like you do above, for example, to show the datetime in an alertbox, or, more commonly, to be use it with other plugin related actions, in order to compare dates, increment days, get number of between days, etc.

The npWeeksBetween action, for example, offer us a sample of the npEncodeDateTime use.

Yeah, I corrected my code and its working fine... I haven't use this function in a while but I think I remember it used to retrieve an integer... so I got confused but yeah, its working nicely as usual smile

Regards.

Offline

#6 2015-09-01 19:20:02

David
Admin
From: Alcobendas, Madrid, Spain
Registered: 2015-04-21
Posts: 1,657
Website

Re: NeoPlugins - npEncodeDateTime not working?

No problem Nelson!

Offline

Board footer

Powered by FluxBB


Copyright ©2018 DecSoft. All rights reserved.