locked
Changing Date format for existing users RRS feed

  • Pergunta

  • 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.
    quarta-feira, 24 de fevereiro de 2010 11:51

Respostas

  • 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
    quarta-feira, 24 de fevereiro de 2010 21:20

Todas as Respostas

  • 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
    quarta-feira, 24 de fevereiro de 2010 12:29
    Moderador
  • Yes Andriy, I updated DateFormatString field but it didn't worked.
    quarta-feira, 24 de fevereiro de 2010 12:44
  • 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
    quarta-feira, 24 de fevereiro de 2010 21:20