I am trying to figure out what is the best way to
Grab the current date/time (is date('Y-m-d H:i:s') best?)
Grab the db date from SQL
Check if the current date (#1) is between the date pulled from the DB and 5hours after it
I'm a newbie at php.
...
I'm wondering if anyone knows of a good date and time library that has correctly-implemented features like the following:
Microsecond resolution
Daylight savings
Example: it knows that 2:30am did not exist in the US on 8 March 2009 for timezones that respect daylight savings.
I should be able to specify a timezone like "US/Eastern" a...
I got the following error/warning while tring to install Kohana/SilverStripe.What does it mean and What do I do for it?
Warning:
date_default_timezone_get():
It is not safe to rely on the system's timezone settings.
You are *required* to use the date.timezone setting or the date_default_timezone_set() function.
In case you used any of t...
There's a lot of info on doing time zone adjustments in PHP, but I haven't found an answer for specifically what I want to do due to all the noise.
Given a time in one timezone, I want to convert it to the time in another timezone.
This is essentially what I want to do, but I need to be able to do it using only the built-in PHP libs, ...
I have a DateTime? variable, sometimes the value is null, how can I return an empty string "" when the value is null or the DateTime value when not null?
...
Hi there
Call me a noob, but i am stuck in converting a DateTime object to a timestamp for the libpcap capture file format (is also used by wireshark, file format definitiom here: http://wiki.wireshark.org/Development/LibpcapFileFormat) in C#. The timestamp i can't manage to convert my object to is the Timestamp in the packet (record) h...
I'm looking for a way to use two DateTimePicker controls to select a range of hours and minutes within one day. That is, to basically select a 'starting time' and 'ending time'.
I started with two DateTimePicker controls with the custom format of h:mm tt. I tried adding (on ValueChanged), a check that made the selected 'starting time' w...
I'm trying to convert a date string from another application in Groovy. Something like
"18-sep-2009 10:25:11 Romance Daylight Time"
It looks like Java does not understand the Romance as timezone alias. "18-sep-2009 10:25:11 Pacific Daylight Time" works fine.
Is there a fix for this other than parse the string and replace "Romance Dayl...
I've got a database full of datetime2 columns than needs to be moved to a SQL 2005 database. So, I need to convert all these datetime2(7) columns to datetime.
How can I go about doing this?
Right now I've managed to select the table name and column name for all columns with the datetime2 datatype like this:
SELECT t.name, c.name, i.DA...
This is my SSIS excerise
I have a DATETIME column, what I want is to get the Month and Year from " DATETIME " column and load it into a new column called “Month_Year” and then get day from the same " DATETIME " and load it into a new column called "day"
Visually
Source Column:
DATETIME
Destination Column:
Month_Year Day
B...
I have related tasks from two Org files/subtrees where some of the clocked time overlaps. These are a manual worklog and a generated git commit log, see below.
One subtree's CLOCK: entries needs to be adjusted to remove overlapping time. The other subtree is considered complete, and it's CLOCK: entries should not be adjusted.
EDIT: Thi...
Hi, so I have these two time stamps in PHP
1253339331
1253338959
I want to be able to somehow get the hour difference between those to datetimes. Our users should only have 24 hours to login after their first attempt, so I need to find out if it's less than 24 hours to allow them to login again.
...
I'm caching files locally in my 3 tier app. To check whether to read the file from the local cache or from the server I compare file dates. I've found that there when converting file dates to TDateTime and viceversa there are inconsistencies and values that should match rarely do. Here's some code that demostrates the problem
procedure ...
In LINQ to SQL, how can I convert this format: "VDate(1253451600000+0200)V"
to an ISO 8601 string, IETF string or timestamp format?
I'm using WCF JSON-Enabled and Ajax-Enabled web service.
...
EDIT 2009-Nov-04
OK, so it's been a little while since I first posted this question. It seems to me that many of the initial responders failed to really get what I was saying--a common response was some variation on "What you're saying doesn't make any sense"--and so I've made some handy diagrams to really illustrate my point.
When we ...
An MS SQL Server 2008 BULK INSERT to a datetime column introduces an error in the 3rd decimal place of the seconds portion: 2009-09-19 15:02:41.328 in the input file becomes 2009-09-19 15:02:41.327 in the database.
Here is what the input text file contains:
1 2009-09-19 15:02:41.328
Here is what the table looks like after BULK INS...
Hello,
I have a variable for startdate as shown below.
Dim startDate as Datetime
startDate = Convert.ToDateTime(datepicker1.text).ToString("dd-MMM-yyyy")
In the immediate window if I try Convert.toDate(datepicker1.text).toString("dd-MMM-yyyy")
it is showing date as 29-Sep-2009
but the value of startDate is 09/29/2009
I really don't...
I having a problem converting a string into the date format I need. An example of the string I'm trying to convert would be 215056081909. I would like to convert that string into 08/19/09 21:50:56.
The code listed below is what I'm trying to use for the conversion process. When I run the code I'm getting the error below and I'm pre...
I am using CF8 and MySQL 5.
I have a form with several date fields (one for each day and the form may have 10+ days of data on it) that the user can select different dates for and they all have different var names within a loop.
The default values for these date fields is null in the DB. I can insert a date into a DATE column in MySQL ...
I am not sure why this i get this mysql error. Originally i didnt have '' around the date. Then i tried ''' and '`' without any luck. Whats wrong?
SELECT COUNT(user) WHERE user=1 AND pass_time<'2009-09-21 13:44:38';
You have an error in your SQL syntax; check the manual that corresponds to your MySQL server version for the right synta...