Empresas
Empregos
  • Sobre nós
  • Soluções
    • Publicação de vagas
      Publique sua vaga e receba candidatos qualificados em 48h.
    • Avaliações de candidatos
      Mais de 500 testes técnicos e psicológicos, mais anti-fraude.
    • Headhunting
      Busca executiva personalizada do início ao fim.
    • Folha de Pagamento + EOR
      Dispersão de folha e EOR em mais de 15 países da LATAM.
  • Preços
  • Empregos

0

111
Visualizações
Issue with Azure mobile service string/date column when queried by app

I have a Mobile Service on Azure and one of my columns (named InputDate) is set as type string. An example value is 2015-07-23T18:00:00Z (ISO 8601 format)

However, when I query this table with the following code:

List<MyTable> MyTableData = await TheTable.Where(t => t.Name == "test")
                                          .OrderByDescending(t => t.__createdAt)
                                          .ToListAsync();

And then when I print out the date using:

Debug.WriteLine(MyTableData[MyTableData.Count-1].InputDate);

It looks like this 07/23/2015 18:00:00 which is a completely different format and doesn't include the T/Z separators and also leads to a System.FormatException: String was not recognized as a valid DateTime. exception when I call DateTime.Parse with the date as the argument.

I'm really not sure why this would be, I know I should probably have the column set as type date, but forgetting that it's a date, as a string it should display exactly as is in Azure, or at least that's what I would like to happen.

over 4 years ago · Santiago Trujillo
1 Respostas
Responde à pergunta

0

Try converting the "DateTime" string property to a datetime with the DateTime.ParseExact static function.

For example: String strDate = "2015-07-23T18:00:00"; DateTime mydate = DateTime.ParseExact(strDate, "yyyy-MM-ddTHH:mm:ss", System.Globalization.CultureInfo.InvariantCulture);

over 4 years ago · Santiago Trujillo Relatório
Responde à pergunta
Encontrar trabalhos remotos

Descubra a nova forma de encontrar um emprego!

melhores empregos
Principais categorias de trabalho
Empresas
Postar vaga Preços Comercial
Jurídico
Termos e Condições Política de privacidade
© 2026 PeakU Inc. All Rights Reserved.
Andres GPT
Recomende algumas ofertas para mim
Preciso de ajuda