Re: [Arsperl-users] Inserting a date in ARSPerl
Brought to you by:
jeffmurphy
|
From: Paizo <pai...@gm...> - 2007-10-17 16:52:40
|
from my experience i can say that date are stored as seconds from 01/01/1970, so i would suggest u to convert the user input into an epoch time http://www.perl.com/pub/a/2003/03/13/datetime.html hope it help 2007/10/17, Pittman, Timothy <Tim...@re...>: > > I have been having considerable difficulty trying to use ARSPerl to > create an entry with a date. My web page is prompting the user to enter > a date, which I'm assuming will be in the format mm/dd/yyyy. I am using > the perl module ParseDate to attempt to figure out what they enter. In > any case, I need to convert this user-entered value into some format > that ars_CreateEntry can deal with. My code does this: > > ($entryId =3D ars_CreateEntry($ctrl, $shopSchema, > $sf{"Description"}, $details, > ... various fields you don't care about... > $sf{"Date Required"}, "$date1", > ... more fields... > $sf{"Status"}, "Submitted")) > or print "\n<p>[ERROR]\tCould not add shop order due to > $ars_errstr<b><br>\n"; > > I have tried numerous ways of formatting the date field $date1 above to > attempt to get it to shop up in the proper format in Remedy. I have > tried numerous variations of the following: > A string (i.e. "10/17/2007") > An integer (converted via timelocal and others to epoch time) > > I either end up with the date 1/1/9999 or 1/1/4713 B.C. in my date > field. I have searched everywhere on the net that I can find and nothing > has helped. Does anyone know what to do to a user-entered date to make > ars_CreateEntry accept it properly? > > This is running on a Win2K server with ARSPerl 1.82 against a Remedy 6.0 > system on Oracle. > > Thanks, Tim > > =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D= =3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D=3D > CONFIDENTIALITY NOTICE > ---------------------- > This message, together with any attachments, may be legally privileged > and is confidential information intended only for the use of the > individual or entity to which it is addressed. It is exempt from > disclosure under applicable law including court orders. If you are not > the intended recipient, you are hereby notified that any use, > dissemination, distribution or copy of this message, or any attachment, > is strictly prohibited. If you have received this message in error, > please notify the original sender and delete this message, along with > any attachments, from your computer. > > ------------------------------------------------------------------------- > This SF.net email is sponsored by: Splunk Inc. > Still grepping through log files to find problems? Stop. > Now Search log events and configuration files using AJAX and a browser. > Download your FREE copy of Splunk now >> http://get.splunk.com/ > _______________________________________________ > Arsperl-users mailing list > Ars...@ar... > https://lists.sourceforge.net/lists/listinfo/arsperl-users > --=20 -------------------- A me cugin na volta xe nd=E0 dal geataro e el ga domand=E0 na coppetta trig= usto co i gusti seegheta, sarexe e schie co na fettina de poenta. El geataro pena sentio che=E0 goduriosa scelta, el se ga messo subito el pigiama de banane e el ghe ga messo in testa a corona de poegge medie e lo ga fatto diventare Re dei Gelati Biricchini. ----------------------- Confezione trigusto seegheta/sarexe/chie co pratico contenitore par e fete de poenta, stile estat=E8 o quea dea ciocoeata Altri gusti poe essere bigadini/kiwi/lasonil co socoi de vacca da tociare o erbagatta/straciatella/calsina co coe de sorxe da tociare ------------ Rileggendo a firma diria che se poe puntare al mercato dei ghiaccioli col e= l gusto crema al diserbo e parafl=F9 ricoperta da una soffice crosta de pus c= o al posto del bacheto un termometro anale pratico pa misurarse a freve dopo aver magn=E0 el geato (chi xe che no lo fa al giorno d'oggi?!?!). Garantite scorese bitonali e solfeggi anali. |