<br><br><div class="gmail_quote">On Fri, Aug 21, 2009 at 2:26 PM, D'Arcy J.M. Cain <span dir="ltr"><<a href="mailto:darcy@druid.net">darcy@druid.net</a>></span> wrote:<br><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<div class="im">On Fri, 21 Aug 2009 14:14:32 -0400<br>
Ronn Ross <<a href="mailto:ronn.ross@gmail.com">ronn.ross@gmail.com</a>> wrote:<br>
> I want to split it into two fields one with the date formatted like this:<br>
> YYYY-MM-DD  2009-08-02<br>
><br>
> and the time to be 24 hour or military time. How every you call it. Similar<br>
> to this:<br>
> 15:22:00<br>
><br>
> I found it easy to truncate off the (UTC), but having trouble converting the<br>
> date. Can someone point me in the right direction?<br>
<br>
</div>You don't say what database you are using but you may find it simpler<br>
to do the conversion in your SELECT statement.  For example, see<br>
<a href="http://www.postgresql.org/docs/8.3/static/functions-formatting.html" target="_blank">http://www.postgresql.org/docs/8.3/static/functions-formatting.html</a> for<br>
PostgreSQL formatting functions.<br>
<font color="#888888"><br>
--<br>
D'Arcy J.M. Cain <<a href="mailto:darcy@druid.net">darcy@druid.net</a>>         |  Democracy is three wolves<br>
<a href="http://www.druid.net/darcy/" target="_blank">http://www.druid.net/darcy/</a>                |  and a sheep voting on<br>
+1 416 425 1212     (DoD#0082)    (eNTP)   |  what's for dinner.<br>
</font></blockquote></div>I apologize I should have made it clear that this date is stored in the db as a string/varchar. The reason it is stored that way is before it's being read in from a text file where it is formatted that way. <br>