regional-settings

Script inserted today's date into spreadsheet is wrong

我只是一个虾纸丫 提交于 2020-07-10 09:56:26
问题 I'm working on a bounded to spreadsheet script for a client, the spreadsheet is owned by them. Among other many things the script should insert today's date into a Google Sheets spreadsheet cell. The problem is that the inserted date is wrong and always the same. I made a copy of the spreadsheet to try to debug my code / find out what setting is wrong but I'm unable to reproduce the problem, like looking at and playing with the spreadsheet and script project timezone settings. This is the

Setting CurrentCulture in VSTO Addin

こ雲淡風輕ζ 提交于 2020-01-25 00:04:17
问题 I am creating a VSTO addin for Excel 2007. All works fine on my development computer with English(UK) regional settings. However some end users will have other settings. All works fine when adding information to the database, however when I try and fill a datatable with English(US) regional settings it fails. Dim TA As New DB_InquiriesTableAdapters.qry_InquiriesTableAdapter Dim DB As New DB_Inquiries.qry_InquiriesDataTable TA.Fill(DB) 'FAILS HERE as date format is incorrect for regional

Can I set the decimal symbol to use everywhere in my application

扶醉桌前 提交于 2019-12-31 03:47:09
问题 I tracked down a bug in my application that occurred for people in countries where the default decimal symbol was a comma instead of a period. Is there any way in C# to set the decimal symbol for my application without affecting other apps or permanently changing the system settings? I tried this but it says the NumberDecimalSeparator is readonly. Thread.CurrentThread.CurrentCulture.NumberFormat.NumberDecimalSeparator = "."; 回答1: I you still need to do that you can change the CurrentCulture

Cross-regional decimal/double parsing

…衆ロ難τιáo~ 提交于 2019-12-22 07:04:38
问题 As a matter of fact, I have multiple systems that can generate numeric data and they are stored on some web server in text files. Some of the systems use decimal point as fraction separator, some of the systems use decimal comma as same. Applications (fat client, .net 2.0) can also be run on either kind of systems. So after some stumbling I did this: ( http://pastebin.com/vhLXABDD ) public static bool HasDecimalComma; public static bool HasDecimalPeriod; public static double GetNumber(string

Split %date% in a batch file regardless of Regional Settings

|▌冷眼眸甩不掉的悲伤 提交于 2019-12-17 07:52:20
问题 Is there a way to split the %date% in a batch file (say, in 3 environment variables), but regardless of Regional Settings? Today's date would be 3/13/2013 for US, but with my Regional Settings it is 13.3.2013 - the delimiter is changed and the order as well . 回答1: You can do it using wmic (but WMIC isn't included with XP Home): @ECHO OFF :: Check WMIC is available WMIC.EXE Alias /? >NUL 2>&1 || GOTO s_error :: Use WMIC to retrieve date and time FOR /F "skip=1 tokens=1-6" %%G IN ('WMIC Path

how to specify month's language (CultureInfo) in Lotusscript Format (now, “dd/mmm/yyyy”)

你离开我真会死。 提交于 2019-12-13 07:56:33
问题 This question is the LOTUSCRIPT version of datetime.tostring month and day language Need description : I need a string date in the dd/mmm/yyyy format (ex: "28 feb 2014"). I don't want english (intl) language for this 3 letters, and not the default regional setting in use in the LOCAL client. Constraints : Programmatic language used: Lotusscript on client side in Lotus Notes. I can't change the regional setting of the client computer. Barely acceptable a specific to Lotus Notes registry is

Server set to en-GB in Regional settings but DateTime parsing as en-US

谁说我不能喝 提交于 2019-12-12 11:54:42
问题 I am processing records by pushing each record through validation stages, then into a database. One of the validation steps requires checking if certain columns are dates. I did this using DateTime.TryParse(s, out DateTime) assuming that this would use the configured Regional Settings on the machine on which the process was running. On my local machine, this is a wrapper class running within a command-line harness from Visual Studio (for ease of debugging). So 13/01/2010 gets formatted as 13

Getting imdb movie titles in a specific language

穿精又带淫゛_ 提交于 2019-12-12 06:43:28
问题 I am writing a crawler in java that examines an IMDB movie page and extracts some info like name, year etc. User writes (or copy/pastes) the link of the tittle and my program should do the rest. After examining html sources of several (imdb) pages and browsing on how crawlers work I managed to write a code. The info I get (for example title) is in my mother tongue. If there is no info in my mother tongue I get the original title. What I want is to get the title in a specific language of my

ASP.net problem with Regional & Language Options (win2k3)

喜你入骨 提交于 2019-12-11 08:37:10
问题 I have a TextBox in an Asp.net form. there is a simple javascript witch separates each three digits in TextBox. it works fine when you enter data in TextBox. I used coma , for separating digits and used dot . as floating point character. as I said every thing works fine when I am entering data in TextBox. but when the post-back occurs and saved data returns to client, every . (s) has been removed (for example 2.3 saved as 23 and digits in TextBox are separated by . instead of , . this problem