Same answer as last time - those are strings, not dates. 02-02-2015 as a
string is before 02-03-2012.
You apply date function to dates, not strings.
You have to parse the dates properly, which was the problem in your last
email.

On Fri, Jun 17, 2022 at 12:58 PM marc nicole <mk1853...@gmail.com> wrote:

> Hello,
>
> I have a dataset containing a column of dates, which I want to use for
> filtering. Nothing, from what I have tried, seems to return the exact right
> solution.
> Here's my input:
>
> +------------   +
> |    Date        |
> +------------    +
> | 02-08-2019 |
> +------------    +
> | 02-07-2019 |
> +----------------+
> | 12-01-2019 |
> +----------------+
> | 02-02-2015 |
> +----------------+
> | 02-03-2012 |
> +----------------+
> | 05-06-2018 |
> +----------------+
> | 02-08-2022 |
> +----------------+
>
> The code that i have tried (always giving missing dates in the result):
>
> dataset = dataset.filter( dataset.col("Date").geq("02-03-2012"));  // not
>> showing the date of *02-02-2015*
>
>
> I tried to apply *date_trunc()* with the first parameter "day" but
> nothing.
>
> I have also compared a converted column (using *to_date()*) with a
> *literal *of the target date but always returning an empty dataset.
>
> How to do that in Java ?
>
>

Reply via email to