A
A
Androbim2019-07-23 16:26:40
SQL Server
Androbim, 2019-07-23 16:26:40

Output date from MSSQL to JSON as single value?

Good day!
The date is derived from something like this query

case 
  when Start < cast(convert(date, :date_from, 104) as datetime) 
    then cast(convert(date, :date_from, 104) as datetime) 
  else Start 
end Start,

as
"start": {
        "date": "2019-07-19 00:00:00.000000",
        "timezone_type": 3,
        "timezone": "Europe\/Moscow"
      },

How can you withdraw
"start": 2019-07-19 00:00:00.000000
?
Sincerely.

Answer the question

In order to leave comments, you need to log in

1 answer(s)
D
d-stream, 2019-07-23
@d-stream

Hm...
select '"start": '+convert(nvarchar,getdate(),121)

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question