Tag archive for ‘date’

Convert string to timestamp in PHP, then insert into MySQL

Question:
I am parsing out HTML from another page, that includes a date and time . I need to store this date/time in a MySQL database. I successfully constructed a string that has the timestamp in it. The string right now is set to “02/16/2010 12:51:47″ . When I try to insert this string into MySQL, [...]

Java Minutes Problem: 0 (zero) to 00 ?

Question:
I’m sure this issue is discussed somewhere, but I’m not finding it, so sorry in advance if I seem a little dense (maybe I need some sleep   I’m writing some Java code to display time.  Whenever the time is something like 23:00, it only shows 23:0;  with 23:01, it only shows 23:1.  Must [...]

SQL Server Date to C# DateTimePicker?? possible??

Question:
Hi yah I am using SQL Server 2008 Enterprise and Visual Studio 2008
I have a Table in SQL Called Personal
With the following in it
CREATE TABLE [Personal]
(
[PID]      int IDENTITY (1001, 1)      NOT NULL PRIMARY KEY,
[FirstName]      varchar(20)      NOT NULL,
[MiddleName]      varchar(20),
[LastName]      varchar(20)      NOT NULL,
[DoB]      date      NOT NULL,
[Gender] varchar(7)      NOT NULL,
UNIQUE (PID)
)
INSERT INTO Personal VALUES(‘Abhisek’, ‘Chandrashekhar’, ‘Kadam’, ‘02/27/2002′, ‘Male’)
…and [...]

Batch File not correctly calculating day since 2010

Question:
Hi,
i’ve been using the below batch file code for years now to display the correct date regardless of the regional settings and also calculate from that the correct day number which refers to a day name. However, since 2010 (I think) it’s been calculating the day number incorrectly and therefore the dayname. The part of [...]

Combo Box with Date Parameter Query in Access 2007

Question:
Greetings Experts,
I am trying to get a combo box named ‘YearBox’ on a form to pass the year to a query.  The source of the combo box is a table with just three records, 2008, 2009, 2010.  I want the year I select from the drop down list to pass to a query that has [...]

How can restricted users see the Date & Tine

Question:
I have a machine that runs Windows XP SP3.  The user of the machine logs in as a restricted user.  The user must remain restricted – this cannot change.
When the user double-clicks the clock in the system tray, the following message appears:  “you do not have the proper privilege level to change the system time” [...]

i want to make trial version for 10 days how can i know to stop the program ?

Question:
compute duration Time of last data modification or creation
for my exe file  and current date time
how can i do  that ?
please  code  it
i tried to use _fstat   to get st_ctime    and  get  time_t
but it not run  may be i mistake to use it please help  me  thanks
Solution:
See this:
It checks for last modify time of a [...]

Access 2007 Simple Custom Date Function Returning Very Weird Results

Question:
Hello all,
I am working on a simple custom function (really simple) so I can test some different formulas to extract data based on dynamic date ranges. I have stuff that always fails in January because I haven’t properly accounted for the change in years, so this year I’m trying to fix it once and for [...]

php date() gives yesterday

Question:
Now is 1:20AM  2010-01-05  and I use php function date() to get today
$time = date(‘Y-m-d’);
but it gives me yesterday 2010-01-04.
Please help me, I need today’s date.
Solution:
As far as I can see there are 1 day of difference between you and your server.
So to fix the time diference:
<?php
echo date(“d-m-Y”,time()-86400);
?>

Interpret binary file for Exif project

Question:
Hello,
I am working on a C# project to process some jpg images using the exif data.  I have many questions, but my first is simply interpreting the binary file using a hex editor.  The exif format specifies the DateTimeOriginal at 0×9003.  When I open the binary file in a hex editor, I see column headings [...]