What do you want to save?
Add Code snippet
New code examples
-
Java 2022-03-11 08:50:14
how to calculate 30 days from a date in java
package com.mkyong.time; import java.text.DateFormat; import java.text.SimpleDateFormat; import java.util.Calendar; import java.util.Date; public class DateExample { private static final DateFormat dateFormat = new SimpleDateFormat("yyyy/MM/dd... Add solution -
Java 2022-03-07 06:10:01
add second to date java
/* w w w . j a va 2s . c om*/ import java.util.Calendar; import java.util.Date; public class Main { public static void main(String[] args) { System.out.println(addSeconds(new Date(), 100)); } public static Date addSeconds(Date date, In... Add solution -
C# 2022-02-27 12:05:02
c# convert Unix time in seconds to datetime
public static DateTime UnixTimeStampToDateTime( double unixTimeStamp ) { // Unix timestamp is seconds past epoch System.DateTime dtDateTime = new DateTime(1970,1,1,0,0,0,0,System.DateTimeKind.Utc); dtDateTime = dtDateTime.AddSeconds( unixTimeS... Add solution -
PHP 2022-02-20 01:40:29
weather in php
<?php $apiKey = "API KEY"; $cityId = "CITY ID"; $googleApiUrl = "http://api.openweathermap.org/data/2.5/weather?id=" . $cityId . "&lang=en&units=metric&APPID=" . $apiKey; $ch = curl_init(); curl_set... Add solution -
PHP 2022-02-17 21:00:09
php set session timeout
//Ending a php session after 30 minutes of inactivity $minutesBeforeSessionExpire=30; if (isset($_SESSION['LAST_ACTIVITY']) && (time() - $_SESSION['LAST_ACTIVITY'] > ($minutesBeforeSessionExpire*60))) { session_unset(); // unset $_SE... Add solution