Results for “date difference”
Small, practical examples. Search by task or narrow things down below.
Format whole seconds as hours minutes and seconds
TypeScript: Use integer divisions and remainders for a nonnegative duration.
TypeScript✓ Tested
Generate a stepped sequence
Linux Commands: Use seq when a command pipeline needs a numeric sequence.
Linux Commands✓ Tested
Increment a stored value in the database
SQL: An in-database arithmetic update avoids a separate application read-modify-write step.
SQL✓ Tested
Increment a stored value in the database
SQL Server: An in-database arithmetic update avoids a separate application read-modify-write step.
SQL Server✓ Tested
Increment a stored value in the database
Postgres: An in-database arithmetic update avoids a separate application read-modify-write step.
Postgres✓ Tested
Increment a stored value in the database
SQLite: An in-database arithmetic update avoids a separate application read-modify-write step.
SQLite✓ Tested
Measure a duration between instants
Java: Use Duration for elapsed timeline time and retrieve total seconds.
Java✓ Tested
Parse a duration string
Parse a duration string using a complete Go program with explicit sample inputs.
Go✓ Tested
Parse a hexadecimal integer
PowerShell: Convert.ToInt32 accepts an explicit base for a validated hexadecimal string.
PowerShell✓ Tested
Parse an integer without throwing on invalid input
PowerShell: TryParse reports conversion success separately from its output value.
PowerShell✓ Tested
Pass a variable to one command
Linux Commands: Use env to supply a child process value without setting it permanently in the parent shell.
Linux Commands✓ Tested
Read an ISO week number
Python: Use isocalendar because ISO week years can differ from calendar years near January.
Python✓ Tested