Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

SQLPredicate and date format #473

Closed
Pepstock opened this issue May 1, 2013 · 5 comments

Comments

Projects
None yet
2 participants
@Pepstock
Copy link

commented May 1, 2013

I had some problems using SQLPredicate with date... I checked the code (even if the available formats were clear in exception message), DateHelper.java and I have seen:

static final String timestampFormat = "yyyy-MM-dd hh:mm:ss.SSS";
static final String dateFormat = "EEE MMM dd HH:mm:ss zzz yyyy";
static final String sqlDateFormat = "yyyy-mm-dd";

Well, it lloks like a bug, assuming you're using SimpleDateFormatter of JDK. In the timestampFormat, you put hours with "hh" but there is nay possibility to force Am/pm marker.
In the sqlDateFormat, you put months with "mm" but there are "Minute in hour"..

Thanks a lot for support. CIAO

@Pepstock

This comment has been minimized.

Copy link
Author

commented Jul 1, 2013

Any update?

@pveentjer

This comment has been minimized.

Copy link
Member

commented Jul 2, 2013

Quick question; which version are you using?

@Pepstock

This comment has been minimized.

Copy link
Author

commented Jul 2, 2013

Hazelcast Community Edition 2.5.1 (20130427)

@pveentjer

This comment has been minimized.

Copy link
Member

commented Jul 3, 2013

Forgive my stupidity, because I'm also new to this part.

Comments about your suggestions:

static final String timestampFormat = "yyyy-MM-dd hh:mm:ss.SSS";

We should either add the 'a' to indicate am/pm or we should use HH to indicate that we want to have military hours (so 00..23).

And on the sqlDateFormat we probably want to use:

static final String sqlDateFormat = "yyyy-MM-dd";

@mdogan and @enesakar can you have a look at this issue as well?

@Pepstock

This comment has been minimized.

Copy link
Author

commented Jul 3, 2013

No problem!

For timestamp:
I prefer HH because in Europe usually we don't use am/pm! :)

For sqlDate
YEESSS! That's correct!

@mdogan mdogan closed this in 9fbcf29 Jul 4, 2013

mdogan added a commit that referenced this issue Jul 4, 2013

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.