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 <[EMAIL PROTECTED]>:
>
> 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 = 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
>
> ========================================================================
> 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
> Arsperl-users@arsperl.org
> https://lists.sourceforge.net/lists/listinfo/arsperl-users
>



-- 
--------------------
A me cugin na volta xe ndà dal geataro e el ga domandà na coppetta trigusto
co i gusti seegheta, sarexe e schie co na fettina de poenta.
El geataro pena sentio cheà 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è 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 el
gusto crema al diserbo e paraflù ricoperta da una soffice crosta de pus co
al posto del bacheto un termometro anale pratico pa misurarse a freve dopo
aver magnà el geato (chi xe che no lo fa al giorno d'oggi?!?!). Garantite
scorese bitonali e solfeggi anali.
-------------------------------------------------------------------------
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
Arsperl-users@arsperl.org
https://lists.sourceforge.net/lists/listinfo/arsperl-users

Reply via email to