Skip to content

Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff] #525

@yidasanqian

Description

@yidasanqian
DateFormat dateFormat = new SimpleDateFormat("yyyy-MM-dd HH:mm:ss", Locale.getDefault());
String currentDate = dateFormat.format(new Date());
expressionList.getExpressions()
                        .add(new TimestampValue(currentDate ));

Exception:

Caused by: java.lang.IllegalArgumentException: Timestamp format must be yyyy-mm-dd hh:mm:ss[.fffffffff]
	at java.sql.Timestamp.valueOf(Timestamp.java:237)
	at net.sf.jsqlparser.expression.TimestampValue.<init>(TimestampValue.java:34)

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions