question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Date and time functions support

See original GitHub issue

The current v3 SDK does not support all date and time functions. The following functions are not supported:

I receive the following error(s) when running the sample queries provided in the links above:

Exception thrown: 'Microsoft.Azure.Cosmos.CosmosException' in System.Private.CoreLib.dll: 'Response status code does not indicate success: BadRequest (400); Substatus: 0; ActivityId: ; Reason: (Microsoft.Azure.Cosmos.Query.Core.Monads.ExceptionWithStackTraceException: TryCatch resulted in an exception. ---> Microsoft.Azure.Cosmos.Query.Core.Monads.ExceptionWithStackTraceException: TryCatch resulted in an exception. ---> Microsoft.Azure.Cosmos.Query.Core.Exceptions.ExpectedQueryPartitionProviderException: {"errors":[{"severity":"Error","location":{"start":7,"end":22},"code":"SC2005","message":"'GetCurrentTicks' is not a recognized built-in function name."}]}

I would like the SDK to be updated to support these methods.

Currently, I am using string functions to manipulate dates. This is less than ideal, and would prefer to use the date and time functions. I am able to run the queries with these methods through Data Explorer. I have tested on versions 3.12.0 and 3.13.0-preview.

Issue Analytics

  • State:closed
  • Created 3 years ago
  • Comments:6 (4 by maintainers)

github_iconTop GitHub Comments

1reaction
william-liebenbergcommented, Sep 24, 2020

Hi @j82w

Confirmed 😃 its working nicely.

Thanks.

1reaction
j82wcommented, Sep 23, 2020
Read more comments on GitHub >

github_iconTop Results From Across the Web

Date and time functions (reference)
Calculates the number of days, months, or years between two dates. This function is useful in formulas where you need to calculate an...
Read more >
DATETIME function
The DATETIME function is a combination of DATE and TIME functions. DATE returns the sequential serial number that represents a particular date.
Read more >
Introduction to Date and Time Functions
Take a look at our full suite of articles on date and time functions to learn more. Date and time functions play a...
Read more >
12.7 Date and Time Functions
This section describes the functions that can be used to manipulate temporal values. See Section 11.2, “Date and Time Data Types”, for a...
Read more >
SQL date and time functions - Support - Workiva
SQL date and time functions · AT TIME ZONE · CURRENT_DATE · DATE · DATE_ADD · DATE_DIFF · DATE_FORMAT · DAY · DAY_OF_WEEK....
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found