Is there a shortcut to insert current datetime as a static value in a cell in Google Sheets?

I have a table like this:

Expense Date What it was for
120 CZK 4.5.2021. 12:30 Pizza coz I’m lazy

I use it to log some expenses, not exactly for pizza but that’s just an example. I also have similar tables where I really NEED both date and time.

I found out that Ctrl+; inserts current date, but without time. Is there also a shortcut for both date and time?

datetime – Office Hours in PostgreSQL

How to store office hours in PostgreSQL rows, so that I can calculate the office hours.

Example:

  • We have open from 9:00 to 18:00 from Monday till Friday.
  • Saturday we have open from 10:00 to 15:00
  • from 24. Dec to 31. Dec we have open from 10:00 to 13:00 (but not on Saturday and Sunday)
  • bank holidays like 25/26 December are closed.
  • All above rules are valid until 31. Dec 2021.
  • Starting from 01. January 2022 we have open from 10:00 to 18:00 from Monday till Friday. Saturday is open like before.

I would like to store this data in rows, so that we can develop an interface for it.

And then there needs to be a method which uses the rows/rules to calculate the specific opening hours.

Different timezone are not important in this context.

I use PostgreSQL version 12.6. But if needed I can upgrade to a newer version.

c# – When Receiving/Returning data in controller action – DateTime conversion between UTC and Epoch in Asp.net core WebAPI

I was wondering what would be a better approach designing a system which deals with UTC DateTime in the service and Database layer but needed to send and receive the DateTime in Epoch format from remote agents.

Consider the following Class (model):

public class UserProfile
{
    (DataType(DataType.EmailAddress))
    public string Email { get; set; }

    public DateTime SomeDate { get; set; }
}

Now if if the APIs needs the value of the SomeDate to be in Epoch format (like Dotnet long type instead of DateTime but the system needs to have the data in UTC DateTime format to process and store in the service codes.

Considering there would be many REST APIs and different models, what would be a global solution to handle the issue. Can this be solved with auto mapper or action filter or something like that?

Is there a way to get, programatically, the datetime of the last update to a google spreadsheet?

In our system we have google spreadsheets which content editors use. I have some processes which pull these down and save them as local csv files, so the data can be read in by the system.

It would be very useful to know, when the system comes to use that data, whether it needs to be re-downloaded, and I thought that if I could somehow retrieve the “updated_at” timestamp for the google spreadsheet I could use that as the basis of a decision on whether to re-download the data.

Is there a way to get this, does anyone know? I’m using Ubuntu.

Is there a way to get, programatically, the datetime of the last update to a google spreadsheet?

In our system we have google spreadsheets which content editors use. I have some processes which pull these down and save them as local csv files, so the data can be read in by the system.

It would be very useful to know, when the system comes to use that data, whether it needs to be re-downloaded, and I thought that if I could somehow retrieve the “updated_at” timestamp for the google spreadsheet I could use that as the basis of a decision on whether to re-download the data.

Is there a way to get this, does anyone know? I’m using Ubuntu.

c# – Não consigo converter numeric para Datetime

Boa tarde pessoal.
Não estou conseguindo converter Type Numeric para Datetime, estou fazendo como mostra abaixo mas não está dando certo.

 var data = "";
                if (sheet.GetRow(2).GetCell(actualColumn).CellType == CellType.String)
                {
                    data = sheet.GetRow(2).GetCell(actualColumn).StringCellValue;
                }
                else if (sheet.GetRow(2).GetCell(actualColumn).CellType == CellType.Numeric)
                {
                    **DateTime.FromOADate(sheet.GetRow(2).GetCell(actualColumn).NumericCellValue);
                    Convert.ToDateTime(sheet.GetRow(2).GetCell(actualColumn).StringCellValue);
                    data = sheet.GetRow(2).GetCell(actualColumn).NumericCellValue.ToString();**   
                }

bash – Piping nc to sed and evaluate datetime for each row

Could someone provide any idea, how could i pipe data from nc to sed (or awk, or anything) and evaluate and write to file a timestamp after each row?
What i have:

# cat /etc/systemd/system/ncserver.service
(Unit)
Description=netcat listener
After=network.target

(Service)
Restart=always
RestartSec=1
ExecStart=/usr/bin/bash -c '/usr/bin/nc -n -v -l -k -p 1313 >> /opt/data/$(hostname)-$(date -u +%%y%%m%%d-%%H).txt'

(Install)
WantedBy=multi-user.target

simple listener – receives text via raw tcp, sends into the file (restarts by cron once a day to generate new file)

I want to append current timestamp to each row of text coming (at the beginning or the end of the row, doesnt matter).
Tried sed, awk, but the problem is that i cannot evaluate date for each row – it evaluates only once, when service started.
Looks like this

109582 ?        Ss     0:00 /usr/bin/bash -c /usr/bin/nc -n -v -l -k -p 1313 | /usr/bin/sed 's/^/'$(date +%s)
 109583 ?        S      0:00 /usr/bin/nc -n -v -l -k -p 1313
 109584 ?        S      0:00 /usr/bin/sed s/^/1617555467;/g

Pipe may be not the answer at all, but i’m kinda limited by bash.
Any ideas?..

Plot count of rows by hour, each date separately, from non-standard datetime values, in Google Sheets

Choose Insert > New sheet and enter this formula in cell A1:

=arrayformula( 
  query( 
    { 
      query( 
        if( 
          len(Input!A1:A), 
          { 
            text(datevalue(left(Input!A1:A, 10)), "yyyy-mm-dd"), 
            hour(timevalue(regexreplace(Input!A1:A, "(d+) (d+)$", "$1:$2"))) 
          }, 
          iferror(1/0) 
        ), 
        "select Col1, Col2, count(Col2) 
         where '" & text(B1, "yyyy-mm-dd") & "' <= Col1 
           and Col1 <= '" & text(B2, "yyyy-mm-dd") & "' 
         group by Col1, Col2 
         label count(Col2) '' ", 
        0 
      ); 
      { iferror(sequence(24)/0, "baseline"), sequence(24), iferror(sequence(24)/0, 0) } 
    }, 
    "select Col2, sum(Col3) 
     group by Col2 
     pivot Col1 
     label Col2 'Hour' ", 
    0 
  ) 
)

Then create a chart based on the result table.

banco de dados – DateTime com variável em Java VSCode – Erro

Dúvida “simples” mas está gerando problemas. Estou fazendo um código, linguagem Java, supostamente era para ser uma variável com o nome de dataValidade do tipo dateTime, mas o VS Code não está aceitando esse tipo, e eu realmente não estou entendendo o motivo. Já tentei tudo, importar biblioteca, referências na classe, mas não está dando certo.
O único caminho foi buscar outros “tipos” de DateTime, deu certo, mas ainda assim não sei como funcionam e acabo ficando insegura.
Até fiz umas pesquisas, mas não deu certo:

https://www.devmedia.com.br/manipulando-datas-em-java/21765

A dúvida é: alguém sabe o que pode estar acontecendo para que a variável não esteja sendo aceita como dataTime?

Segue abaixo o código da classe não principal:

import java.sql.Date;
import javax.print.attribute.standard.DateTimeAtCompleted;

public class ingredientes {

// Classe Ingrendientes com os atributos nome e DataValidade.
String nome ;
DateTimeAtCompleted dataValidade;

}