The BMC "Form and Application Objects" Guide says: Users can enter dates from January 1, 4713 B.C. to January 1, 9999 A.D.
2440588 is the difference (in days) between January 1, 1970 AD and January 1, 4713 BC. I don't know why they chose 4713 BC as the starting year. Regards, Thilo Stapff Pittman, Timothy wrote: > Thanks. That worked. I understand where 86400 came from, but what is > the significance of 2440588? > > Tim Pittman > Project Engineer > Respironics, Inc. > > -----Original Message----- > From: [EMAIL PROTECTED] > [mailto:[EMAIL PROTECTED] On Behalf Of Thilo Stapff > Sent: Wednesday, October 17, 2007 1:03 PM > To: ARSperl User Discussion > Subject: Re: [Arsperl-users] Inserting a date in ARSPerl > > > Unfortunately, date fields (unlike date/time fields) are only supported > since ARSperl version 1.90 > > The value has to be an integer which can be computed from an epoch > timestamp by > > int( $epoch_time / 86400 ) + 2440588 > > > Regards, > Thilo Stapff > > > Pittman, Timothy wrote: >> 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 > ------------------------------------------------------------------------- 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