Giter Club home page Giter Club logo

Comments (5)

torshid avatar torshid commented on June 10, 2024

Hello,

Not sure to have understood you but I think that you want to change date patterns. You may check this section of the readme to do that https://github.com/turkraft/spring-filter#date-format.

Or are you asking for Date fields to support multiple patterns at the same time?

from springfilter.

Jeffster2021 avatar Jeffster2021 commented on June 10, 2024

I'm asking to support a pattern containing time for Date fields. Or maybe support multiple patterns.

For example, we have a Postgres table
create table test(date_field timestamp);
So field contains date and time.

But the model entity is

@entity
class Test {
private Date dateField;
...
}

In this case, we can filter only by date value not considering the time.
Of course, it's possible to change the field in the model entity, but sometimes there are a lot of legacy code :)

from springfilter.

torshid avatar torshid commented on June 10, 2024

In your application.properties, if you add

turkraft.springfilter.dateformatter.pattern=dd-MM-yyyy'T'HH:mm:ss

You should be able to filter using dateField : '12-05-2021T10:39:16'

from springfilter.

Jeffster2021 avatar Jeffster2021 commented on June 10, 2024

Thanks, you're a lifesaver.
I've read the doc page and tried it before, but maybe I was doing something wrong.
Sorry for wasting your time,

from springfilter.

torshid avatar torshid commented on June 10, 2024

No problem. Feel free to open other issues.

from springfilter.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.