Sounds easy, I’m ordering results based on a year. Currently ‘2022’ for example, saved as a integer.

Some results need to span two years and are 2022-2023 for example. I can create a label column with the text of this, but how can I create an integer that’ll order between 2022 and 2023?

2022.5 maybe as a float?

Any other ideas?

Why do you need an integer between 2022 and 2023? Sounds like that's your real problem.

    A DATE is not an INTEGER nor a FLOAT. First, fix the column type and then it is as simple as:

    SELECT *
    FROM your_table
    WHERE your_date_column BETWEEN '2022-01-01' AND '2023-12-31';
      12 days later

      nzkiwi80 Some results need to span two years and are 2022-2023 for example

      This is pretty vague. Clearly you can't put '2022-2023' in an integer. Is this a duration? How might you want it to sort if you had these values:
      2022
      2023
      2022-2023
      2022-2024
      2021-2025
      2021

        17 days later

        TEST
        Didn't bump up.
        Thread List did NOT update.

          Write a Reply...