Questions for date


how to add/subtract 2 days in the target day in python?

I have a problem in adding or subtracting 2 days to the target day...

UTC clock based on server time?

I have a JavaScript clock that gets the time in UTC, it currently works, but the time is based off the client's computer. What could I do to base the time off of the server instead? I am using PHP ...

Javascript Date Object from string in form 'HH-MM'

Hey, just wondering how to convert an HH:MM string into a javascript Date object. I have tried new Date(string); and myDate.setTime() but to no avail.

Format current date to show day of the week

I want to show the current date in my application like this:

Compare in Rails but ignore year?

I have the following code in my Rails 3 application:

Correct input values of strtotime

I want to convert a date by the following statement

show timing as per own country (and not as per server time)

I am creating web application where I need to store timestamp/ date.

user insert date in form

I have a form where the user needs to insert a date. This date is then used by the program to determine an expiry date. My question is, how is the best method for the user to insert the date in the...

JSF convertDateTime renders the previous day

A date (as the Date temporal type) is stored in my DB like this: 31.10.2012

Getting rows between date range in mysql

I am having a serious issue I can not figure out. I am trying to return rows from MySQL database that have a Start date between two given dates and an End date as well. Here is my php code to query...

How do I get next month date from today's date and insert it in my database?

I have two columns in my db: start_date and end_date, which are both DATE types. My code is updating the dates as follows:

24 hours of values

I have a sql table : date (Y-m-d) / time (00:00:00) / power (INT)

When are API methods marked “deprecated” actually going to go away?

I'm code reviewing a change one of my co-workers just did, and he added a bunch of calls to Date.toMonth(), Date.toYear() and other deprecated Date methods. All these methods were deprecated in JD...

Localization: Do all locales put the weekday before the date?

Here's a simple (hopefully) L10N question:

Javascript - Calculate date 1 year/3 months/1 month ago from current date (dd-mm-yyyy)

I have a dropdown box that contains 3 options..monthly, quarterly and yearly. I am trying to populate 2 fields when either of the options are selected. The start date will be the current date, and ...

How to get all rows in certain month

I have a column named DC34_DATE of type DATE (defined this way: DATE '2013-04-17'). I need to select all rows for a specific month (for example April). I have used WHERE MONTH(DC34_DATE)=04; but it

Date insert into mysql table

My sql insert was date(%d-%M-%y) but that has zero effect on the field no data was added. Neither did inserting 02-Dec-2010. What do I have to change the table field Type or Default to so that the ...

Convert varchar2 to Date ('MM/DD/YYYY') in PL/SQL

I need to convert string from varchar to Date in 'MM/DD/YYYY' format. My input string is '4/9/2013' and my expected output is '04/09/2013'. i.e. 2 digit month, 2 digit date and 4 digit year seperated

How do you generate a sequence of the last day of the month over two years in R?

I use lubridate and figured that this would be so easy

Powerbuilder Date Math

How do I subtract 30 days from a date in PowerBuilder?

Calculate the last day of the quarter

What's the most efficient way to calculate the last day of the prior quarter?

Android Emulator Returns Wrong Date

I am trying to get the date in Android using this code

stringtotime from Unix timestamp

I am doing the following in my php script and I am not seeing the results I though I would:

php if else show statement - date dependent like. show if date=Dec. 2, 2010 or less than?

I updated my photo-gallery framework recently. But I still need the old 'javascript files' in stories older than a certain date, eg: Dec. 2, 2010. (stories are in CMS/dynamic)

Making a timestamp from 01-01-0001 to a given date/time

I have got an issue in which I am using the FileMaker PHP API which interacts with the FileMaker platform from the web.

SimpleDateFormat parseexception when parsing time

I have converted some dates to string and stored them in my database using

Using MongoExport, how do I control the output of Date fields?

I am trying to format some data from Mongo into a CSV. One of the fields is stored as an ISODate, so when querying Mongo, comes out like this:

Create a Date UTC with a timezone-based timestamp

Odd question, but you have to know first that Facebook API defines all the dates with a timestamp (long = number of second) started 01/01/1970 00:00:00 located on PDT timezone (Pacifica time).

Calculate diffference between 2 dates in SQL, excluding weekend days

I would like to build an SQL query which calculates the difference between 2 dates, without counting the week-end days in the result.

Calculate business days

I need a method for adding "business days" in PHP. For example, Friday 12/5 + 3 business days = Wednesday 12/10.

SQL “between” not inclusive

I have a query like this:

Fetching column values based on SYSDATE

I have a table wchih has 2 columns. The definition is

time vs date vs calendar java

Well in my app I want to get current date and month abnd local hour (currentTimeZone hour) and depending on its value display some things.

Date command with zsh

I'm trying to use the date command to output today's date in the format %d.%m.%y-%H:%M:%S. Obviously I just do that like this:

PHP/MySQL: Retrieving the last *full* weeks entries

I'm currently using the following SQL for retrieving the last seven days worth of entries from a table:

Check if value is date and convert it

I am using SQL Server 2012

PHP date format error

I have an array with a key timestamp with the following content

How to select information from database that is day, week, month, year old?

I'm currently getting "top rated articles" by summing vote values from 'votes' table against articles from 'stories' table.

PHP: check datetime to see if it's coming up

I've getting a DATETIME from the database and I need to be able to check to see whether or not that date is within 30 days from now.

Weird strtotime() issue - reading as incorrect format

The server's locale is set correctly, on other domains it seems to be fine... however I am currently experiencing a strange problem.

Oracle Is there a way to update date and not month, year

Is there a way to update the date part of a column of type Date. For example, a row in the DB has value 2013-11-22 [stored in YYYY-MM-DD format]. And I want to update it to 2013-11-01.

date as SEO optimization tool

Consider the following PHP code for printing current date:

How does one tell if a new month has started? php/mysql

I have the dates stored in a mySQL table from 2010 - 2040 in the following format:

Adding one week via java.util.Calendar.add() fails

I'm trying to iterate in my Java program over all weeks between two dates (the end date being today). First, I get the starting date:

How to use Rails date helper methods outside of Rails?

I am converting some Rails controller code to be generic Ruby code. I came across this: