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...
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...
Formatting date SQL date to remove time
Hi,I need a way of changing the following SQL statement so that the dates are without the hh:mm:ss tt:"Select DISTINCT([StartDate]) From [Events]"How can this be done?Thanks,Curt. Regards, Curt
SELECT CONVERT (VARCHAR, [StartDate], 101) FROM ...
For other date formatting types, see http://msdn2.microsoft.com/en-us/library/ms187928.aspxMark replies as answers if they helped you solve the problem.
use the following Conversions
Convert("urdatecolumn",Varchar,101);
and there are more codes for the dateconversions.Its general Syntax is
Convert("urdatecolumn",...
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...
Compare file modified date time to system date time
I have an client application that uploads a zip file to a server. Once the server application sees the file, it processes the file. The process starts before the zip file is completely downloaded to the server. I want to delay the process until the file is completely downloaded. I am trying to compare the zip file modified date time with the system date time. If the zip file modified date time is 5 seconds older than the system date time then I know the zip file downloaded. At this point I will continue to process the zip file. I am not sure how I can compare the two date time. The DateTime....
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...
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 /...
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...
SQL Server 2005 and conversion of date-time between time-zones
Hi.
I am using SQL Server 2005 and have some SQL Jobs which run as scheduled. There is a date-time field in one of my tables which take time-zone specific values. Now I need either of the following:
Convert that date-time to equivalent GMT or UTC date-time (with DST awareness). GETUTCDATE() converts local date-time [GETDATE()] to its GMT equivalent, but I have the requirement to change a particular date-time value to GMT.
Convert one date-time value from one time-zone to another time-zone date-time value.
Any h...
Dates, Dates, Dates!
Hello all...
I am in the process of building an appointment system, and I am trying to see if I can get some pointers on which way to go on this.
The first version of this appointment system was very lo-tech, and it stored all of the possible dates/times in the database. Once a user booked an appointment, their information was logged to that date/time, and then that date/time would no longer show in the list of possible openings. This was great for a temporary fix, but with having to pre-populate all of the dates/times, the system would eventually have to be updated to continue on pa...
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...
Convert Date/Time to Date
Hi
I'm using .NET 2.0 framework with a Postgres DB. I'm getting date values from the table 'creationdate' and I need to compare it with other date value (given by me). The thing is that tha date returned from the DB comes like this '27-03-2006 0:00:00' and the date value that I use to campare comes like this '27-03-2006'. I want to know how to convert the returned date value from the DB to date only...?!
I tried using the following:
SELECT CONVERT(char(10),creationdate,101) AS date FROM calendar.events WHERE date = "myDate";
but it gives me an error: syntax error at or near "," at c...
Removing Time from date timeWe would like to form a recordset that would have the datetime column be
just the date. We have students visiting our web several times a day and
each of these are counted as distinct dates. We would like just the
total number of days that they used the web not the total number of
times they accessed the web.
Thanks
Jim
You can use date function on datetime column, or use cast. eg:
select datetime_col, date(datetime_col), cast(datetime_col as date) from
some_table
Hope this helps,
Goran
jmwarren wrote in message <39A66A36.8B355AA6@pilot.msu.edu>...
>We would li...
Date raw date time
I have a value in a string array that is {3/15/1976}
When I do a tostring with a short date it changes that to 15/03/1976
Is there a way I can get just the raw text out of the string? Without it giving it to me as a date?
Thanks
Hi latrotter2,
If you have a DateTime object and want to the string value to have a certain format, you must pass the format to the .ToString() Methos. Example:
[Visual Basic]
Dim tempDateString As String = DateTime.Today.ToString("M/d/yyyy")
Response.Write(tempDateString)
[C#]
string tempDateString = DateTime.Today.ToStr...