Category "datetime"

how to create time slots in flutter/dart

I'm trying to create a list of time slots for building an appointment-related app. For example, build-time slots from 8 AM TO 10 PM with a 30-minute gap between

Python arrow get list of years between date range

I have this function: def function(start_date_arrow=None,end_date_arrow=None, date_concept=None): list=[getattr(date, date_concept) for date in arrow.Arrow.

gin/golang gin-gonic does not parse time.Time properly for unix json?

I cannot find the way to execute this code properly with UNIX: package main import ( "time" "github.com/gin-gonic/gin" "net/http" ) type Things struct

Python Convert YYYYMMDD string to YYYY-MM-DD string Without Using Datetime

How can I convert a string such as: '20190501' To a string such as: '2019-05-01' Without first converting to datetime, for example: from datetime import

how can i filter data between two time i am using date time field for it in django rest framework

I am trying to filter my data with a date-time field, but in my case its not working. So please someone suggest to me how can I filter my date with time start_t

How can I tell if DateTime.Now() is on a day AFTER a different DateTime

I'm running this on flutter, but I guess this could be a more general issue. I am saving a DateTime in the preferences. I want to be able to then tell if DateT

Convert string date format MM/dd/yyyy HH:mm:ss.SSSS to timestamp presto

I have a string that looks like: 2022-03-30 17:18:09.569000 I am trying to convert this to a timestamp as follows: select "date_parse"("date_format"('2022-03-3

Add a new record for each missing second in a DataFrame with TimeStamp [duplicate]

Be the next Pandas DataFrame: | date | counter | |-------------------------------------|--------------

how to set plt.xlimit with date and time

I can only set the x axis limit to a certain date, but not with hours, minutes seconds. My code looks like this: plt.figure() plt.plot(data.date,sig,'b-') plt.x

How to fix ParserError: year 0 is out of range: 0000-00-00 with Python Pandas to_datetime method

I am trying to convert a column "travel_start" to a datetime object. Dashboard["travel_start"] = pd.to_datetime(Dashboard["travel_start"]) But I get the fol

How to work with gas days in a C# project?

A gas day is defined as a time range of 24 hours which starts at 5:00 UTC and ends at 5:00 UTC of the following day during the European standard time. During th

Luxon setZone not working when getting epoch time (valueOf)

I have been trying to use Luxon to get (for comparison reasons) the epoch miliseconds from two DateTimes in different timezone. I'm using the .valueOf() method

Time difference between two time showing wrong values in js

I want to check time difference between two times and get difference in minutes, using javascript and my time format is 12 hrs with am/pm for example : compar

Fill missing date and time in Python (pandas)

I have a large data set, a sample is given below. The data is recorded for 1 day with 5-min interval for 24 hours for 3214 unique ids. The time and date informa

How to delete older files and keep last day files for each month in python

I need to retain the backup file started on 31st april and ended next day May 1. backup timings differ for each folder, but the backup files are identical

YYYYWW format in SQL Redshift

My company recently migrated to Redshift from Redash recently and I'm having a hard time recreating the YEARWEEK() function available in MySQL but not in Redshi

Kubernetes logs dump for some time range

Is it possible to obtain Kubernetes logs for a dedicated time range? All I can do right now is to make a dump of about the last-hour log for the single pod usin

Convert string to date using arrow python

I'm trying to convert string to date using arrow module. During the conversion, I received this error: arrow.parser.ParserMatchError: Failed to match '%A %d %B

Calculate the difference in days between two date fields

I have a problem. I have two date fields fromDate and toDate. The toDate also contains a timestamp, e.g. 2021-03-22T18:59:59Z. The problem is that I want to cal

Python get months start and end dates for a given year

I want to write a python function to get months start and end dates for a given year. Sample Input : 2021 Expected output : [(01-Jan-2021,31-Jan-2021), (01-Feb-