locked
Changing Date format for existing users RRS feed

  • Question

  • Hi all,

    My question is about user settings. As all you know each user can set his/her own date format but in my case I need to set one specific format (dd/MMM/yy). I modified system settings from CRM but of course it didn't effect existing users.

    There are many users who has different format like (dd/MM/yyyy etc.). I have to apply this change for all existing users, what you can suggest ?

    I was thinking to update database-UserSettingsBase table but I couldn't achive anything.

    Thnx.
    Wednesday, February 24, 2010 11:51 AM

Answers

  • I have done this with other fields, it didn't change the main drop down but did update the underlying settings.
    	dateformatcode			 = 2 
    	dateformatstring		 = 'dd/MM/yyyy'
    	dateseparator			 = '/'
    Here's my original update script
    --Perform the update
    UPDATE UserSettingsBase SET 
    	currencydecimalprecision 	 = 2,
    	currencyformatcode		 = 0,
    	currencysymbol			 = '£',
    	dateformatcode			 = 2,
    	dateseparator			 = '/',
    	reportscripterrors		 = 3,
    	timeformatcode			 = 0,
    	timeformatstring		 = 'HH:mm',
    	timeseparator			 = ':',
    	timezonecode			 = 85,
    	timezonebias			 = 0,
    	dateformatstring		 = 'dd/MM/yyyy',
    	timezonedaylightmonth	 	 = 3,
    	timezonedaylightday	     	 = 5,
    	timezonedaylighthour	 	 = 1,
    	longdateformatcode		 = 1,
    	uilanguageid			 = 1033,
    	negativecurrencyformatcode 	 = 1,
    	helplanguageid		     	 = 1033,
    	modifiedon			 = getdate()
    
    from 
    	--dbo.FilteredUserSettings
    	dbo.UserSettingsBase
    
    	--INNER JOIN dbo.FilteredSystemUser  SU
    	INNER JOIN dbo.SystemUserBase SU
    	ON UserSettingsBase.systemuserid = SU.systemuserid
    WHERE 
    	SU.IsDisabled			 = 0 AND 
    	NOT SU.CreatedBy		 IS NULL

    @_Simon_Jackson http://www.simonjackson.info/ MBCS MCBMSS MCBMSP MCSD MCDBA MCAD MCSA
    Wednesday, February 24, 2010 9:20 PM

All replies

  • There is DateFormatString column in this table. You can try to update it, but remember that this is very unsupported.
    Truth is opened the prepared mind

    My blog (english)
    Мой блог (русскоязычный)free countersLocations of visitors to this page
    Wednesday, February 24, 2010 12:29 PM
    Moderator
  • Yes Andriy, I updated DateFormatString field but it didn't worked.
    Wednesday, February 24, 2010 12:44 PM
  • I have done this with other fields, it didn't change the main drop down but did update the underlying settings.
    	dateformatcode			 = 2 
    	dateformatstring		 = 'dd/MM/yyyy'
    	dateseparator			 = '/'
    Here's my original update script
    --Perform the update
    UPDATE UserSettingsBase SET 
    	currencydecimalprecision 	 = 2,
    	currencyformatcode		 = 0,
    	currencysymbol			 = '£',
    	dateformatcode			 = 2,
    	dateseparator			 = '/',
    	reportscripterrors		 = 3,
    	timeformatcode			 = 0,
    	timeformatstring		 = 'HH:mm',
    	timeseparator			 = ':',
    	timezonecode			 = 85,
    	timezonebias			 = 0,
    	dateformatstring		 = 'dd/MM/yyyy',
    	timezonedaylightmonth	 	 = 3,
    	timezonedaylightday	     	 = 5,
    	timezonedaylighthour	 	 = 1,
    	longdateformatcode		 = 1,
    	uilanguageid			 = 1033,
    	negativecurrencyformatcode 	 = 1,
    	helplanguageid		     	 = 1033,
    	modifiedon			 = getdate()
    
    from 
    	--dbo.FilteredUserSettings
    	dbo.UserSettingsBase
    
    	--INNER JOIN dbo.FilteredSystemUser  SU
    	INNER JOIN dbo.SystemUserBase SU
    	ON UserSettingsBase.systemuserid = SU.systemuserid
    WHERE 
    	SU.IsDisabled			 = 0 AND 
    	NOT SU.CreatedBy		 IS NULL

    @_Simon_Jackson http://www.simonjackson.info/ MBCS MCBMSS MCBMSP MCSD MCDBA MCAD MCSA
    Wednesday, February 24, 2010 9:20 PM