Convert string to real date time value?

Here is my current input:


And yes it seems there is a line break in the cell…

Here is example sheet:

How could this be turned into an actual date and time?

python – Apply additions on a base array based on date ranges

please roast my code, I hope this is the good place to look for some advice on where I can improve.

Problem definition:

Apply modifications on values depending on date ranges.


Base array – holds dictionaries in the following format:

({‘date’: 20200101, ‘value’: 1}, {‘date’: 20200102, ‘value’: 2})

Modifier array – holds dictionaries with similar format:

({‘date’: 20200101, ‘value’: 1}, {‘date’: 20200201, ‘value’: 2})

Add the respective value of the modifier array to the base array lining up the date ranges. Dates are exclusive, for example when the modifier array contains 2020-01-01 you have to add the value ‘1’ to all values in the base array that have a date less than 2020-01-01. Base array has a lot of elements while modifier array relatively few. In practice this splits the base array into a couple of date ranges. If the last modification date is less than the date in base array no modification is required.

My solution:

This is assuming the comparing of dates will work, I have translated this from perl for an easier read.

mod_index = 0 
mod_size = len(mod_arr)

for elem in base_arr:
  if elem('date') > mod_arr(mod_size - 1)('date'):
    if elem('date') < mod_arr(mod_index)('date'):
      elem('value') += mod_arr(mod_index)('value')
      elem('value') += mod_arr(mod_index + 1)('value')
      mod_index += 1

date – JAVA Mostrar por consola la fecha con el mes especificado

tengo una clase llama Socio la cual crea un socio con su nombre, nif y fecha de alta.

Al crearlo en el main tengo que hacer que muestre por consola exactamente:

Socio: Antonio Romero Nif: 12345678X Fecha de alta: 30 abril 2015

He intentado lo siguiente (recordar que tengo una clase llama Socio con estos tres atributos con su toString y la fecha la tengo con un LocalDate)

    DateTimeFormatter fechaFormateada = DateTimeFormatter.ofPattern("dd/LL/yyyy");
    Socio socio = new Socio("Antonio Romero", "12345678X",
    LocalDate.parse("30/04/2015", fechaFormateada));

Y me muestra lo siguiente:

Socio: Antonio Romero Nif: 12345678X Fecha de alta: 2015-04-30

Me falla la fecha, tengo que poner que sea 30 abril 2015, en el código anterior es algo que he intentado hacer con DateTimeFormatter y parse pero no sé si es algo que tenga que utilizar.

typescript – Get Next Monday and Sunday from particular Date

Given a particular Date, want to find the next occurring Monday and Sunday. Please help
In Brief:
If current date is 25 May 2020(Monday)
– need to get next monday(1 June 2020)and Sunday(7 June 2020)from current date
If Current date is 26 May 2020(Tuesday)
– need to get next monday(1 June 2020)and Sunday(7 June 2020)from current date
If Current date is 27 May 2020(Wednesday)
– need to get next monday(1 June 2020)and Sunday(7 June 2020)from current date
so on
If Current date is 31 May 2020(Sunday)
– need to get next monday(1 June 2020)and Sunday(7 June 2020)from current date

 getNextStartDate(): string {
        const currentDate = new Date();
        const weekday = new Array(7);
 weekday(0) = 'Sunday';
        weekday(1) = 'Monday';
        weekday(2) = 'Tuesday';
        weekday(3) = 'Wednesday';
        weekday(4) = 'Thursday';
        weekday(5) = 'Friday';
        weekday(6) = 'Saturday';
        const n = weekday(currentDate.getDay());
        if (n === 'Sunday') {
            currentDate.setDate(currentDate.getDate() + 1);}
return currentDate.toISOString().replace(/-/g, '').split('T')(0);


untagged – How to get date from my Garmin ForeRunner 225 or Garmin Connect?

I just switched to a Garmin running watch (ForeRunner 225), and am missing some very basic stuff.

As far as I can see, Garmin Connect (online), only shows a pokey little map of my run (actual size):

enter image description here

I would expect to be able to a larger view map, hopefully full screen – am I missing something? I am aware of this, but it does not work for me.

Last time I use a Garmin was over ten years ago when I had a ForeRunner 301 and they had a different app. IIRC, that had a map, it also had histograms below. You could click on either and it would show the other. Click on a point of your run on the map & it would show your data at that point, such as time heart rate, distance, etc. Click on some data, say a point with high heartrate, and it would show you it on the map.

I can’t believe that they have regressed in their software capability, so maybe I am just too dumb to own a Garmin?

Can I use Garmin Connect to view data in the way described? Or is there a Windows app to get the data from the watch?

If not, which would surprise me, can I export the data, either from the web site or the watch? I am a programmer and can code my own app, if need be. I did find a way to export data for a run from the website as CSV, but that was only a summary – it did not show individual data readings for time/GPS/heartrate, etc.

I am probably overlooking something very basic, but I just can’t find it & google is not my friend today.

8 – Change sort order of SOURCE STRING list at User interface translation page to alphabetical instead of date created

At the User interface translation page (/admin/config/regional/translate) the SOURCE STRING list seems to be ordered by creation date/time (it is for strings I add). Is there a “good” (non-hackish) way to change the order to alphabetical? I haven’t found anything in the interface.

For those who wonder why I want this, I use interface translation in an unconventional way. Instead of putting literals like t("Choose your options") in my code, I put in a key like t(‘rsc-string-choose-options’) (rsc is the name of my custom module). Then as the translation, I put in “Choose your options”. This allows me to use “keys” for all strings (literals, messages, titles, email body text, etc.). It’s easy to look up my keys because they all begin with ‘rsc-‘ followed by ‘string’, ‘message’, ’email’, etc. depending on usage. Doing this provide a nice interface for editors to go in and change the text of the strings, since they can look them up either by translation or by key. I also wrote a nice utility that allows me to add, remove, rename, and test keys (i.e. translation strings). It’s working very well, but it would make review much easier if the source strings were alphabetical.

How does github determine the first commit date of a file?

I’m not very familiar with github and it’s web interface except how to do basic operations (view the uploaded files, download as zip, fork project)

Recently Microsoft open sourced the GWBASIC assembly source code, and all the files in the project show that they were committed 38 years ago except which was added 5 days ago

enter image description here

I always thought the commit date was based on when the file as first uploaded to github, but doesn’t seem to be the case. What is happening here, or did github actually exist in 1983?

Microsoft announcement

sql server – conversion failed when converting date and/or time from character string c#

Action Method:

PayTns std = new PayTns();
std.C_Group = fc(“C_Group”);
std.Date = Convert.ToDateTime(fc(“Date”));
std.C_Name = fc(“C_Name”);
std.D_Group = fc(“D_Group”);
std.D_Name = fc(“D_Name”);
std.Amount = Convert.ToInt32(fc(“Amount”));
std.Remark = fc(“Remark”);
if (D_flag == “true”)
std.D_Flag = true;
std.D_Flag = false;
std.T_No = Convert.ToInt32(fc(“T_No”));
TempData(“msg”) = “Data Inserted”;

Data Connection:

SqlCommand com = new SqlCommand(“Master_PayTns_Add”, con);
com.CommandType = CommandType.StoredProcedure;
com.Parameters.AddWithValue(“@Date”, ie.Date);
//com.Parameters.AddWithValue(“@A_GRef”, ie.A_GRef );
com.Parameters.AddWithValue(“@C_Group”, ie.C_Group);
com.Parameters.AddWithValue(“@C_Name”, ie.C_Name);
com.Parameters.AddWithValue(“@D_Group”, ie.D_Group);
com.Parameters.AddWithValue(“@D_Name”, ie.C_Name);
com.Parameters.AddWithValue(“@Amount”, ie.Amount);
com.Parameters.AddWithValue(“@Remarks”, ie.Remark);
com.Parameters.AddWithValue(“@D_FLag”, Convert.ToBoolean(ie.D_Flag));
com.Parameters.AddWithValue(“@T_No”, ie.T_No);


SSMS sql server logs rotate date

we have a sql server which rotates it’s logs using a job.
But the rotation/creation date of the log is not shown (see screenshot). Any help would be great!
sql server log view

zapier – Reset a destination date column value

I can already change the value of a destination DateTime field by assigning it e.g. 2000-01-01 00:00. But if either of the systems changes their timezone, this value will also change with them, so I cannot rely on it always keeping this value.

So, is there a way to clear the value of the column?

If we do not type or insert a value, Zapier assumes that we do not want to update it.

enter image description here