Category "datetime"

Slice DataFrame using Dates from a List and its offset as a range for slicing in a for loop

This my DataFrame df with calendar days frequency and DateTime Object as Index. This data starts from 1989-01-03 till present day: Pri

How do you deal with wall-clock times without date in Go?

I'd like to know if there is any existing package to deal with datetimes without date in Golang. The problem is as follows. Imagine I want to store information

Dart/Flutter How to compare two TimeOfDay times?

TimeOfDay documentation has no comparison operator and primitive comparison does not work. My only solution that I can thinking of right now is to convert TimeO

Comparing two date objects in Python: TypeError: '<' not supported between instances of 'datetime.date' and 'method'

This shouldn't be too difficult but I can't seem to get it to work. I want to compare two datetime.date types in Python but I keep getting a Type Error: from

How can I print every minute using Datetime with Python

As an example, I want to print, "1 min", every time 1 minute has passed using time or datetime. I cant use time.sleep(60) because I have more code that needs t

How to fix "AttributeError: type object has no attribute" in python?

I am adding some code to the preset code to check the time availability, which is if the meeting time can fit into the proposed time schedule. However, I keep g

How can I create basic timestamps or dates? (Python 3.4)

As a beginner, creating timestamps or formatted dates ended up being a little more of a challenge than I would have expected. What are some basic examples for r

strange issue with coldfusion 2021 datetime as it shows java dump

I am using mysql and one of the column has a datetime datatype, when i do a output, it actually displays a java class, https://prnt.sc/10sgstg so why it is dis

Converting DateTime to time ago in Dart/Flutter

The question is how to format a Dart DateTime as a string stating the time elapsed similar to the way you see times displayed on Stack Overflow. Is there any b

Pandas: how to get index value of non-unique index

I have a data frame with a date time index where index values are non unique (see last two index values). I would like to get the next valid index value given a

Convert string to_datetime with wrong place day and month

I have a dataset like this df = pd.DataFrame({'time': ('08.02.2020', '21.02.2020', '2020.05.04')}) df I do pd.to_datetime(df['time']) 0 2020-08-02 1 2020-0

Python Pandas Dataframe Datetime Range

Here is my code block: import pandas as pd import datetime as dt first_day = dt.date(todays_year, todays_month, 1) print(first_day) >2021-02-01 print(type(

Conversion failed when converting date and/or time from character string mssql sequelize

I'm trying to use Sequelize and node js to connect to a MS Sql server database and i have the following error when i try to test the post route in Postman: "Con

Passing UTC DateTime to Web API HttpGet Method results in local time

I'm trying to pass a UTC date as a query string parameter to a Web API method. The URL looks like /api/order?endDate=2014-04-01T00:00:00Z&zoneId=4 The s

Modify microseconds of a PHP DateTime object

I have a PHP DateTime object with microseconds created as follows: $time = microtime(true); $microseconds = sprintf('%06d', ($time - floor($time)) * 1000000);

How can I determine what work shift the current time falls in?

I am currently getting the day of the week depending on the current date: var d = new Date(); var day = ["Domingo","Lunes","Martes","Miercoles","Jueves","Vierne

Jackson/Kafka LocalDateTime serialization not working properly

We have a very strange/intermittent issue with kafka and jackson. We have a dto defined which has 4 date field startdate, enddate and a embedded metatdata class

Adding one microsecond to Datetime object in PHP

I need to add a microsecond to a Datetime object in PHP. I am trying to do it adding a time interfal a fraction of a second to the Datetime but it is not workin

c# parse date time with timezone

How can we parse date time with time zone. <TIMESTAMP_UTC>20180523160000</TIMESTAMP_UTC> <TIMEZONE>UTC+8</TIMEZONE> this should conve

How to get current time with jQuery

The following returns time in microseconds, for example 4565212462. alert( $.now() ); How do I convert it to a human readable time format, such as (hours:mi