Removing Time from date time

We 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

0
jmwarren
8/25/2000 12:44:38 PM
sybase.sqlanywhere.general 32637 articles. 4 followers. Follow

2 Replies
769 Views

Similar Articles

[PageSpeed] 49

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 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
>


0
Goran
8/25/2000 1:13:32 PM
ASA has a built in function DATE that removes time. Though it's not
mentioned in the documentation it works on timestamps too, and since
datetime is implemented as timestamp it should solve your problem

Anders

jmwarren wrote:

> We 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

--
http://www.moulin-noir.com


0
Anders
8/25/2000 1:32:07 PM
Reply:

Similar Artilces:

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...

How to Remove Time from Date/Time format in asp...
i have created a asp file which reads data from my database..... in my database file i have a Data/Time field.... but the problem is when i run the aspx file on the borwser it shows the date but it also shows the time like this: 2INS309 27/09/2004 00:00:00 2INS505 30/09/2004 00:00:00 2INS505 30/09/2004 00:00:00 2CST552 20/09/2004 00:00:00 2COS407 20/02/2005 00:00:00 what i want to know how can i remove those 0? is there anyway when the file loads it only shows the date????? Hi, yes you can with string formatting, means you format the date/time instance how i...

remove time part from a date/time field value
How does one remove or avoid the time part from a date/time field value. For example store 12/12/2006 instead of 12/12/2006 12:00:00 Am --------------------------------------------------No Project Too Eazy.-------------------------------------------------- You can use one of the appropriate Standard DateTime Format Strings such as d or D.Darrell Norton, MVPDarrell Norton's BlogPlease mark this post as answered if it helped you! You should be able to use DateTime dt = DateTime.Now dt.ToString("d")  //this will format as short date time FYI: If you want to do it at the query ...

time-time
Hi There, Delphi 2010 with PostGresSQL 9.3 database. I did try := Time(), the way it worked with Paradox and many more I tried. E2250 no overload version of "TimeToStr" that can be called with this argument. Can somebody guide me here, thanks in advance. {delphi code} dm.tArrivedwaiting.value := timetostr() - dm.tArrivedtime.value ; {code} Fields are StringFields or time with time zone(tried without??) ////// CREATE TABLE "ARRIVED" ( dummy serial NOT NULL, userno smallint, "time" time with time zone, patientno integer, ...

java date time and utc date time
hi 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...

times out all the time!!!
Name: Optical Excellence Email: specsatopticalexcellencedotca Product: Thunderbird Summary: times out all the time!!! Comments: I can not access either the web email site downloaded mail nor the Thunderbird email downloaded email because I get a time out all the time!! Not a way to run an email site, especially as this is for our business! Browser Details: Mozilla/5.0 (Windows; U; Windows NT 5.1; en-US; rv:1.8.1.6) Gecko/20070725 Firefox/2.0.0.6 ...

MOVED: time between to given times (was: time between to given times)
On Wed, 11 Feb 2009 15:21:06 -0800, Mike Thomas wrote: Moved to delphi.language.delphi.general https://forums.codegear.com/thread.jspa?threadID=11972 -- Marc Rohloff [TeamB] marc -at- marc rohloff -dot- com ...

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...

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....

Adding time for past dates dates or correcting a time entry
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 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...

Convert MySql Date/Time to ASP.net Date/Time
I am pretty new to ASP.Net and to MySql. I am receive the following error message when I try to retrieve a date field: Unable to convert MySql date/time to System.DateTime The message points to the following code: Response.Write(dtrReader("fldDate")) What do I need to do so that I can read this date into my program.  It appears they two systems store dates differently, but I do not know enough about either to know where to begin. Please help Thanks Is your issue like this one? Also try setting the "Allow Zero Datetime" = True in the ConnectionString.http://forums.mysql.com/read...

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",...

Date entered...add time value to make date/time field
Windows 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...

Web resources about - Removing Time from date time - sybase.sqlanywhere.general

Facebook Removing Outdated School Info from Some Users’ Timelines?
It appears that Facebook is in the process of reminding users that they are no longer in college , as some users are seeing notices that their ...

Removing App Profile Pages
Today, we are announcing that we will remove all App Profile Pages on February 1st, 2012. Though similar in appearance, the automatically generated ...

Friends Checker Tracks Who’s Removing You From Their Facebook Friends List
Last week, Facebook reminded users that when they ignore friend requests the requesting party is not notified, but a new Greasemonkey script ...

Removing the 140-character limit from Direct Messages
If you’ve checked your Direct Messages today, you may have noticed that something’s missing: the limitation of 140 characters. You can now chat ...

Flying Fish, Great Dish (Part 1: Introduction & Removing Filets) - YouTube
Asian carp is an invasive fish species that has rapidly taken over ecosystems in parts of the Mississippi River and Missouri River regions. These ...

Kmart joins Target in removing GTA5 video game from shelves after online campaign
Target has bowed to pressure from an online campaign calling it to pull popular R-rated video game Grant Theft Auto V from its shelves.

Removing the rorts
Professor John Freebairn, veteran analyst of public policy, believes the Commonwealth spends an unsustainable amount on 'middle-class welfare'. ...

France: officials start removing 1 million 'love locks' from Paris bridges
Paris, known worldwide as the city of romance, on Monday began removing tens of thousands of &quot;love&nbsp;locks&quot;, padlocks chained to ...

Roger Rogerson and Glen McNamara seen on CCTV removing body of Jamie Gao from storage unit
ROGER Rogerson and Glen McNamara were captured on CCTV &#8220;bending, lifting and kneeling down&#8221; as they &#173;removed the body of shooting ...

Bud Light beer ads: “Removing no from vocabulary” outrage - Business News - Business and Finance News ...
US BEER brand Bud Light has apologised and retracted a slogan which suggested having a drink would remove the word &#8216;no&#8217; from your ...

Resources last updated: 12/11/2015 11:24:12 AM