<?xml version="1.0" encoding="utf-8"?>
<feed xml:lang="en" xmlns="http://www.w3.org/2005/Atom"><title>Recent changes to 17: JDBC update function doesn't handle a Calendar properly</title><link href="https://sourceforge.net/p/millscript/bugs/17/" rel="alternate"/><link href="https://sourceforge.net/p/millscript/bugs/17/feed.atom" rel="self"/><id>https://sourceforge.net/p/millscript/bugs/17/</id><updated>2005-04-15T11:44:32Z</updated><subtitle>Recent changes to 17: JDBC update function doesn't handle a Calendar properly</subtitle><entry><title>JDBC update function doesn't handle a Calendar properly</title><link href="https://sourceforge.net/p/millscript/bugs/17/" rel="alternate"/><published>2005-04-15T11:44:32Z</published><updated>2005-04-15T11:44:32Z</updated><author><name>Kevin Rogers</name><uri>https://sourceforge.net/u/moya/</uri></author><id>https://sourceforge.net9693bf566cbf3a04a21db3c100da605a9d65b8ea</id><summary type="html">&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;</summary></entry></feed>