Skip to content

Time Literal DateFormat Parsing #24

Closed
@danap

Description

@danap

According to the jdbc4.0 ref. which I'm sure a new version is available, the following Date & Time
Literals have the format.

Date: {d, 'yyyy-mm-dd'}, Time:{t, 'hh:mm:ss'}, Timestamp: {ts, 'yyyy-mm-dd hh:mm:ss.f...'}

I would assume therefore if a TEXT data type field has the contents 2015-03-22 and contents are
returned via getDate() then I would not expect a date parse error would occur. Currently the
getDate() function is using a common DateFormat for all three of the time literals of
{yyyy-MM-dd HH:mm:ss.SSS}.

I would like to propose the SQLiteConfig class define the appropriate static instances of
DEFAULT_DATE_STRING_FORMAT, DEFAULT_TIME_STRING_FORMAT, & DEFAULT_TIMESTAMP_STRING_FORMAT along
with associated instances to be used in the resultSet returns for getDate(), getTime(), and
getTimeStamp(). It appears the setting methods are working appropriately.

If this is acceptable then I could perform the coding and submit for review and update. Perhaps
this issue is similar to open #18?

Thank you for your work in keeping the best option for the sqlite-jdbc current.

Dana Proctor
MyJSQLView Project Manager

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions