0

I want to import in a SharePoint list a column containing the "year". So, I have in the import column just a number, like "2020".

Then, I use the List to display is a custom React application that uses this list.

What kind of type should I put to the column? Date? Number?

If I put the number, it displays me with thousands separators 2 020 (in the default view). Even if this is not critical, as I display it in a custom application, I am not sure if the "number" is the best format for this column. enter image description here If I use as "date-time", I think the import will fail if I import only "2020".

3
  • 1
    Where it is showing thousands separator, in SharePoint default list view? Sep 22, 2022 at 10:00
  • @GaneshSanap that is not critical, because finally I will display it in the react application as I want
    – serge
    Sep 22, 2022 at 10:00
  • Can you show us which API call are you using and what are the outputs you are getting for this number column? Sep 22, 2022 at 10:03

1 Answer 1

2

You should use "Number" column for storing year in SharePoint list.

You can set "Use thousands operator" to "No" from column settings:

enter image description here


Update from comments:

  1. For validations: you can use "Min" and "Max" options or column validation option in column settings.

Follow below steps to open modern experience column settings:

  1. Go to SharePoint list view

  2. Click on column name/header, select Column settings > Edit

    enter image description here

  3. After clicking on Edit, you will see the column settings panel. Scroll down on panel, click on "More options". You will see "Use thousands operator" option under More options in column settings panel

12
  • how about validation and things like this? negative, decimal, too big to small
    – serge
    Sep 22, 2022 at 10:03
  • also, defalt value could be current date if I use a date...
    – serge
    Sep 22, 2022 at 10:04
  • You can use column validation settings for number column. You can set "Min" or "Max" values for number columns from column settings Sep 22, 2022 at 10:04
  • I have no such an option "use thousands separator", I can display as "%" and specify the number of decimals
    – serge
    Sep 22, 2022 at 10:07
  • Which version of SharePoint are you using? Are you using classic experience or modern experience? Sep 22, 2022 at 10:07

Your Answer

By clicking “Post Your Answer”, you agree to our terms of service and acknowledge that you have read and understand our privacy policy and code of conduct.

Not the answer you're looking for? Browse other questions tagged or ask your own question.