Category "datetime"

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

Get actual time from internet ?

How to get 'current(actual) time' or 'network operator's time' programmatically if device time is changed ? I'm trying to get current time through 'getLastKnow

Get DataFrame with the number of rows for each time interval

Given the following DataFrame of pandas in Python: | ID | date | |--------------|------------------------------------

how to manage the timezone which are not directly supported in java

we are getting the ZoneId object by passing the id string -> ZoneId.of("US/Alaska") While getting the timezone ids from java after passing the location name,

Get file modification time to nanosecond precision

I need to get the full nanosecond-precision modified timestamp for each file in a Python 2 program that walks the filesystem tree. I want to do this in Python i