Page 4 of 14

hpwNewLISP

PostPosted: Wed Feb 11, 2004 7:43 am
by datadon
In Excel, you can 'format' a date that looks like this:

Saturday, September 04, 2004

the actual date value looks like 09/04/2004.

The date in the dbf file is stored like this in date format:

09/04/04

but need someway in NB to show it like:


Saturday, September 04, 2004


As I write this I realize I might be able to parse out
the pieces and come up with something, but....



Seems like NewLisp has some impressive date features,
anyway to get this option into that plug-in?  I know Sam was doing some work in this area.  

Just asking....

Don

hpwNewLISP

PostPosted: Wed Feb 11, 2004 8:24 am
by Sam Cox
This post deleted by author in favor of subsequent post.  See below.


(Edited by Sam Cox at 2:58 am on Feb. 12, 2004)

hpwNewLISP

PostPosted: Wed Feb 11, 2004 8:34 am
by datadon
You're a real pro Sam.  Thanks! Looking forward to see your example when you can get to it.    I wish there was time and a way to have a seminar somewhere we all could learn to use the great stuff available.  It's really just a matter of time I guess.  Where do we want to spend it, use it.  Of course a little brain power doesn't hurt either. ;-)

Powerful stuff.

Don

hpwNewLISP

PostPosted: Thu Feb 12, 2004 8:05 am
by Sam Cox
I posted in the Archives an hpwNewLisp solution called 'dateinfo' complete with documentation and a sample pub  that provides all the flexibility you might want to format date strings in NeoBook.

Given a date such as "mm/dd/yy" or "mm/dd/yyyy", 'dateinfo' returns a CSV string of fourteen fields that may be arranged as you like. For example:

   hpwNewLispCall "(dateinfo {2/14/04})" "[myinfo]"
   StrParse "[myinfo]" "," "[field]" "[fieldcount]"
   SetVar "[dateFormatted]" "Day [field3] of [field7] is a [field10]."

The date info fields are"

   StrParse "[myinfo]" "," "[field]" "[fieldcount]"
   .[field1] = day-of-week (0-6 = sunday-saturday)
   .[field2] = day-of-month (1-31)
   .[field3] = day-of-year (1-366)
   .[field4] = month (1-12 = january-december)
   .[field5] = year-of-week-of-year
   .[field6] = week-of-year (1-53)
   .[field7] = full year (e.g., 2004)
   .[field8] = year-of-century (0-99)
   .[field9] = century (e.g., 19 means 1900)
   .[field10] = day-of-week-name (e.g., "Sunday") -- user definable
   .[field11] = month-name (e.g., "January") -- user definable
   .[field12] = leap-year-notice ("leap" or "non-leap") -- user definable
   .[field13] = days-in-month (28-31)
   .[field14] = days-in-year (365 or 366)

The sample pub, newLisp source code, and more documentation are available here

(Edited by Sam Cox at 3:07 am on Feb. 12, 2004)

hpwNewLISP

PostPosted: Thu Feb 12, 2004 9:09 am
by datadon
Sam,

Thank you for the excellent function.  It was more than I could have dreamed of asking for.  Seems to be the Swiss Army Knife of date functions.  I hope I can return the favor in the future.  We all now benefit.  

And thanks to the others (especially HPW for the excellent plugin) who have contributed so much to this forum.  It is most appreciated.

Don

(Edited by datadon at 11:11 am on Feb. 12, 2004)

hpwNewLISP

PostPosted: Thu Feb 12, 2004 11:41 am
by HPW
>(especially HPW for the excellent plugin)

The thanks have to go to Lutz Mueller for newLISP. The interface is so little work compared with his great lisp-language.

Sam, thanks again for such comprehensive lisp-code. Well done.

hpwNewLISP

PostPosted: Wed Apr 07, 2004 7:19 am
by HPW
Upload a new zip.

New final release of newLISP.dll 8.000

Release notes here:
http://newlisp.org/download/newLISP_80_ ... Notes.html

hpwNewLISP

PostPosted: Wed Apr 07, 2004 7:47 am
by HPW
Please not the change in sys-info:

http://www.alh.net/newlisp/phpbb/viewtopic.php?t=270

The DLL has now it's own return-numer 7.

hpwNewLISP

PostPosted: Tue Jun 08, 2004 1:11 pm
by HPW
Upload a new zip.

New official release of newLISP.dll 8.0.6

http://newlisp.org/download/newLISP_80_ ... Notes.html

hpwNewLISP

PostPosted: Thu Jun 10, 2004 1:13 am
by HPW
Upload a new zip.

Demofile: UdpSender + UdpReceiver

Related to this discussion:
http://www.neosoftware.com/cgi-bin/ikon ... topic=1578

Shows how to combine 2 neobook apps with Udp-commands.  Problem with UdpReceiver is, that it gets blocked during listening to the Udp-port.

I have posted a feature request on the newLISP forum for a additional timeout parameter. Lets wait what Lutz think of it.

hpwNewLISP

PostPosted: Thu Jun 10, 2004 8:29 am
by HPW
Upload a new zip.

Demofile: external UdpListener.exe

This external app can run hidden and log all incoming messages in a subdir. Then the app can process them whenever it is possible. The filename for each message is generated from the newLISP 'date-value (now)'

hpwNewLISP

PostPosted: Mon Jun 14, 2004 8:33 am
by HPW
Upload a new zip.

Demofile: UdpReceiver DLL with timeout

with newLSIP.DLL 8.0.7

hpwNewLISP

PostPosted: Fri Jul 09, 2004 12:16 pm
by HPW
Upload a new zip.

with newLISP.DLL 8.0.8

hpwNewLISP

PostPosted: Mon Jul 19, 2004 9:28 am
by HPW
Upload a new zip.

with newLISP.DLL 8.0.10 Beta

It is now compiled with MinGW/GCC.
Compressed DLL is around 12KB smaller.
Please report any problems.

hpwNewLISP

PostPosted: Wed Jul 21, 2004 8:42 am
by HPW
Upload a new zip.

with newLISP.DLL 8.0.12

Sample-UdpListener now also MinGW-compiled.
New newLISP command 'dup' (generic replicator)