<?xml version="1.0" encoding="utf-8"?>
<rss version="2.0" xmlns:atom="http://www.w3.org/2005/Atom"><channel><title>Recent changes to 17: JDBC update function doesn't handle a Calendar properly</title><link>https://sourceforge.net/p/millscript/bugs/17/</link><description>Recent changes to 17: JDBC update function doesn't handle a Calendar properly</description><atom:link href="https://sourceforge.net/p/millscript/bugs/17/feed.rss" rel="self"/><language>en</language><lastBuildDate>Fri, 15 Apr 2005 11:44:32 -0000</lastBuildDate><atom:link href="https://sourceforge.net/p/millscript/bugs/17/feed.rss" rel="self" type="application/rss+xml"/><item><title>JDBC update function doesn't handle a Calendar properly</title><link>https://sourceforge.net/p/millscript/bugs/17/</link><description>&lt;div class="markdown_content"&gt;&lt;p&gt;The JDBCExecuteUpdateFunction doesn't handle the &lt;br /&gt;
java.util.Calendar type properly. This is a particular &lt;br /&gt;
problem as DATE fields are returned as instances of &lt;br /&gt;
java.util.GregorianCalendar. Other time fields will be &lt;br /&gt;
returned as instances of java.lang.String. &lt;/p&gt;
&lt;p&gt;The ideal solution to this would involve adding proper &lt;br /&gt;
support for dates and times into the language, then &lt;br /&gt;
updating the interface with an SQL database to handle &lt;br /&gt;
these types appropriately. &lt;/p&gt;
&lt;p&gt;A work around is to manually construct a date string from &lt;br /&gt;
the calendar object as follows: &lt;/p&gt;
&lt;p&gt;"%p/%p/%p".format( calendar.dateYear, &lt;br /&gt;
calendar.dateMonth, calendar.dateDate ) &lt;/p&gt;
&lt;p&gt;but this is dependant on the database in question and &lt;br /&gt;
how it parses dates. The above code forces PostgreSQL &lt;br /&gt;
to parse the date in the yyyy-mm-dd format, as the &lt;br /&gt;
dateYear function returns a four digit year. &lt;/p&gt;&lt;/div&gt;</description><dc:creator xmlns:dc="http://purl.org/dc/elements/1.1/">Kevin Rogers</dc:creator><pubDate>Fri, 15 Apr 2005 11:44:32 -0000</pubDate><guid>https://sourceforge.net9693bf566cbf3a04a21db3c100da605a9d65b8ea</guid></item></channel></rss>