Get new global prepopulation year range SELECT @NewMinPopulationYear = CONVERT(DATETIME, CONVERT(NCHAR(4), DATEPART(Year, ...

'

        -- Get new global prepopulation year range
        SELECT @NewMinPopulationYear = CONVERT(DATETIME, CONVERT(NCHAR(4), DATEPART(Year, @MinTime)) + '0101')
        SELECT @NewMaxPopulationYear = CONVERT(DATETIME, CONVERT(NCHAR(4), DATEPART(Year, @MaxTime)) + '0101')

        -- MinPrepopulatedTimeLevel is
English
English (United States)
Deutsch (Deutschland)
German (Germany)
Español (España)
Spanish (Spain)
Français (France)
French (France)
日本語
Japanese
한국어
Korean