From mboxrd@z Thu Jan 1 00:00:00 1970 X-Spam-Checker-Version: SpamAssassin 3.4.4 (2020-01-24) on polar.synack.me X-Spam-Level: X-Spam-Status: No, score=-1.9 required=5.0 tests=BAYES_00 autolearn=ham autolearn_force=no version=3.4.4 X-Google-Language: ENGLISH,ASCII-7-bit X-Google-Thread: 103376,2c14e9c4fe99a4f6 X-Google-Attributes: gid103376,public Path: g2news1.google.com!news1.google.com!news.glorb.com!solnet.ch!solnet.ch!irazu.switch.ch!switch.ch!newsfeed.sunrise.ch!news.sunrise.ch!not-for-mail From: "Roger Blum" Newsgroups: comp.lang.ada References: <40d31280@news.admin.ch> Subject: Re: ADA.CALENDAR.TIME_OF problem with cygwin gcc-ada Date: Sat, 19 Jun 2004 21:14:42 +0200 X-Priority: 3 X-MSMail-Priority: Normal X-Newsreader: Microsoft Outlook Express 6.00.2800.1409 X-MimeOLE: Produced By Microsoft MimeOLE V6.00.2800.1409 Message-ID: <40d4910f$0$26634$5402220f@news.sunrise.ch> NNTP-Posting-Host: 62.167.114.22 X-Trace: 1087672591 news.sunrise.ch 26634 62.167.114.22 Xref: g2news1.google.com comp.lang.ada:1696 Date: 2004-06-19T21:14:42+02:00 List-Id: "Brian May" schrieb im Newsbeitrag news:sa4oengmgnc.fsf@snoopy.apana.org.au... > >>>>> "Roger" == Roger Blum writes: > > Roger> I 'd like to use the function TIME_OF in the package > Roger> ADA.CALENDAR to convert a date/time (string format from > Roger> database "DD.MM.YYYY HH:MI:SS") to a TIME type in order to > Roger> calculate intervals between dates etc. Although I call the > Roger> TIME_OF function with correct input, it raises a CONSTRAINT > Roger> ERROR (I'm using gcc-ada from cygwin). > > What time_of function is this? I can't see any that takes a string > as a parameter... > > The only one I know of is this one: > > function Time_Of > (Year : Year_Number; > Month : Month_Number; > Day : Day_Number; > Seconds : Day_Duration := 0.0) > return Time; > -- > Brian May It's of course the function mentioned by you. Before calling it I split and convert the string accordingly. Roger