date/time or date and time
I am setting up an SQL database and I will need to get differences in dates. For example I have a start date, start time, completion date and completion time and I want to get the difference between the start and completion.
Would it be better to have one field with both date and time in it, or better to have a date field and a time field?
Even though I have already started setting up the tables with seperate fields for date and time I am now leaning toward one field with date/time in it. (Only because that is the way I had to do it when setting up an Excel spreadsheet for a similar ta...
java date time and utc date timehi
i have a client written in delphi
the backend is written in java (webservice)
when fetching a date field from the db, through java to delphi (TXSDateTime class), for some reason the date changes.
in the db: 30/07/2009 00:00:00
in delphi: xsdatetime.asdatetime = 29/07/2009 23:00:00 (1 hour before)
in delphi xsdatetime.asutcdatetime = 29/07/2009 21:00:00 (3 hours before)
i guess it's a matter of timezones but all we want is simply to fetch the same date as it appears in the DB
what are we missing?
thanks
amos szust wrote:
> hi
>
> i have a client written in d...
Date.Compare won't compare dates with times??
Maybe I'm just on crack, but something doesn't seem right here. I'm trying to compare 2 timestamps and it doesn't seem to be working correctly.
If I compare only dates without times it works as expected:
MessageBox.Show(DateTime.Compare("3/5/04", "3/5/04")) ' returns 0
MessageBox.Show(DateTime.Compare("3/5/04", "3/6/04")) ' returns -1
MessageBox.Show(DateTime.Compare("3/5/04", "3/4/04")) ' returns 1
However, if I include times it doesn't seem to work correctly:
MessageBox.Show(DateTime.Compare(CDate("3/5/04 ...
just Time or date portion of a date/time field
Good Day,
From a DateTime data column how do I get just a
Time portin or just a date portion of data to be displayed.
i.e
from
11/6/2003 10:03:20 AM
I need to display date and time seperately in my data display page.
Thanks
Regards,
In code you could use
Dim dt as System.Date
Dim day, month, year as integer
day = dt.Day
month= dt.Month
year = dt.Year
This also works with DateTime
In SQL you could use
DATEPART(<datepart>,<datetime>)
where <datepart> is the abbreviations mentioned in post 385301 and <datetime> is a...
Changing the system date, time and/or time zonefollowup to grc.techtalk
Changing the system date, time and/or time zone
http://blogs.msdn.com/aaron_margosis/archive/2005/02/11/371474.aspx
-----------------------------------------------------------
Quote
-----------------------------------------------------------
By default, only Administrators and Power Users can use the ?Date and Time?
applet to change the computer's date, time, or time zone. A regular User
double-clicking on the clock in the notification area of the taskbar gets
only an error message that says, "You do not have the proper privilege
level to change...
Adding time for past dates dates or correcting a time entryHi all,
We are using Bugzilla to record time spent on bugs. Is there a way for
a person to add time on a previous date?
Or is there a way to correct an entry?
I can access the DB by an ODBC connector, but I'm reluctant to change
the date in bugs_activity table.
Thanks
Sanjay
On Jul 29, 3:58=A0pm, Sanjay Jain <sanjayjai...@gmail.com> wrote:
> Hi all,
>
> We are using Bugzilla to record time spent on bugs. Is there a way for
> a person to add time on a previous date?
>
> Or is there a way to correct an entry?
>
> I can access the DB by...
File modified date/timeIs there a way to find the date/time of a file when it was last
modified? I want to see if a user has updated a text file using Notepad
or Wordpad via my PB app.
Thanks in advance.
--
David Hepburn,
Sydney, Australia.
Check out the code in the PFC file services object - even if you're not
using PFC you can use the code. You want
pfc_n_cst_filesrvwin32.of_getlastwritedatetime()
David Hepburn wrote in message <356270A5.58C8CE7B@powerpeople.com.au>...
>Is there a way to find the date/time of a file when it was last
>modified? I want to see if a user has upd...
Date entered...add time value to make date/time fieldWindows XP Professional
InfoMaker v 9.0.2 Build 7509
Our database contains a date/time stamp for when a specific activity
happens to each shipment. I would like the users to be able to simply
enter a date for a specific work day. I need to get a list of shipments
where the time of one activity occurred on the entered date prior to
9:20. How can I create a computed field that will basically
concatenate/amend the entered date with 9:20 that will later be used for
criteria in returning rows?
Thanks in advance for any help you can provide!
Rita Palazzi
Senior Engineer /...
Server Date & Time vs. Local Date & Time
I have the following code (which some members assisted with) and it works great locally...
It takes the date and time and formats just the way I want: e.g.: 10/28/2008 13:58:44 becomes 102820080158 (which is what I want)
But, when I upload the app to our server the date pulled is: 10/28/2008 1:59:37 PM
As a result the date skips the formatting and does not work, so how can I code this so the date/time will be the same whether its local or on a server, and I have adjusted the regional settings to match - and same issue...
just Time or date portion of date/time field: SOMEBODY PLS
Good Day,
From a DateTime data column how do I get just a
Time portin or just a date portion of data to be displayed.
i.e
from
11/6/2003 10:03:20 AM
I need to display date and time seperately in my data display page.
Thanks
Regards,
When you pull in a SQL datetime column value into your .NET code, it is usually cast to a .NET DateTime type... something like this:
System.DateTime TheDateAndTime = (System.DateTime)someDataReader["MySQLDateColumn"]
Then you can use a variety of .NET methods included in the DateTime class to convert to a strin...
Daylight Savings Time and File Date/Time StampsWe use automated scripts for AutoCAD Lisp routines to compare files on a
local workstation's hard drive to the same files located on the server.
If the server files are "newer", then we copy them to the workstation.
Thus... we have a poor man's setup to "update" workstations when AutoCAD
Lisp programming changes/updates are made.
When Daylight Savings time ended Saturday night, the server's time changed
as expected, but the time stamp on our files created between April and
October also changed. All the files created in that time period had a o...
File time & date change every timeHi,
Since some days, I have a curious problem with file time/date on my file
server Novell 6.5 (service pack 4). The date/time "last modified" always
change. For example, I have a file "last modified" 12 september 2003,
17:40. Each time I verify the Properties with Windows XP pro, this
time/date increase !!!. If I copy this file on a local harddisk, the date
is fixed on the file copied, but continue to increase on my file server.
It create hudge problems for incremental backup !!!
Any idea to resolve this strange situation ???
Thanks in advance !
ea...
file time/date stamp compare..I was wondering how you look at the timedate stamp of a file. I want to check to see if the one on a server is more up to date.
Tim Thorson <> wrote:
>I was wondering how you look at the timedate stamp of a file.
Since you asked in the language group,
the answer would be stat();
Had you asked in the nativeapi group
the answer would have been FindFirstFile();
...
"Bob Gonder" <none@nowhere.invalid> wrote in message
news:34700@forums.codegear.com...
> Had you asked in the nativeapi group
> the answer would have been FindFirstFile();
Or G...
DATE field to DATE/TIMEHello,
If the field is defined as a DATE and you do:
select datefield+1 from mytable
Does the ODBC API (actually ASA 9.02 backend) return a field that is
DATETIME or a DATE field? It is messing up my compiled application and
seems to be coming back as DATETIME.
Thank you.
-Robert
You are correct, the value is being returned as a TIMESTAMP. You can
verify this through using the EXPRTYPE() builtin function, as in
select exprtype('select datefield+1 from mytable', 1) from dummy
which will return TIMESTAMP. Exprtype is documented in the help.
You alm...