Dates

Hi All ...
I'm a newbeee using vb2008 express, vs2008, & sql 2008 express.

I have created a column in my sql table with the DATE data type as I only 
want to store/display the date portion in my winform control field which 
works fine on a but on a report I also get the default time (12:00:00 AM) 
displayed.

How do I truncate or format this to only display the date portion on the 
report ?

Thanks
Paul J. 

0
Apollo
4/1/2010 8:40:12 PM
dotnet.languages.vb 830 articles. 0 followers. Follow

1 Replies
738 Views

Similar Articles

[PageSpeed] 33

Hi,

> How do I truncate or format this to only display the date portion on the 
> report ?

The report is done using ? Programmatically you would call 
MyDate.ToString("d") to show the date without the time portion. Your 
reporting tool (Crystal, SSRS ?) should have a Format property in which you 
could enter the same "d" format string and it should have the same effect...

--
Patrice 

0
Patrice
4/1/2010 9:48:16 PM
Reply:

Similar Artilces:

excel putting random cells into date format
I opened a new spreadsheetand started inputting data. About 100 lines into a very simple sheet of only 3 columns the numbers started turning inot dates all by them selves. I highlighted the cells and reformatted to the general formatting and it immediately went back to the date format. Additionally, when I printede the spreadsheet it printed pages and pages of blank gridlined sheets until I realized it and turned off the printer. THen when I saved the file it was 7meg! This file had 5 pages, 3 colums each and no more than 300 rows each. I cut and pasted the data into a spreadsh...

Formula reads date as number
I have a formula that reads a list of dates in cells K5 through K20 an compares these dates to 1 date in cell M3. Cell M3 shows a date bu when I run the evaluate formula auditing tool on the formula, M3 date shows as a number, thus the formula fails. Any hel -- pete576 ----------------------------------------------------------------------- pete5761's Profile: http://www.excelforum.com/member.php?action=getinfo&userid=2961 View this thread: http://www.excelforum.com/showthread.php?threadid=49423 Dates are stored as number of days since 1-1-1900. So today (dec 16,2005) is stored as...

in access databse the function date() returns #name
i have created an access data base at access 2003 profisonal and used the function date() it worked properly . but when i have coped my data base at another computer at the same office , the funtion retuned (name#) aW4gQWNjZXNzOyB0aGUgRGF0ZSBmdW5jdGlvbiBkb2Vzbid0IHdvcmsgc29tZXRpbWVzLgoKaXQgd29ya3MgYWxsIHRoZSB0aW1lIGluIFNRTCBTZXJ2ZXI7IGJ1dCB5b3UndmUgZ290IHRvIGNhbGwgaXQKR0VUREFURSgpCgoKCk9uIE1hciA3LCAxMToyNMKgcG0sINmF2K3ZhdivINiq2KfYrCDYp9mE2KPYtdmB2YrYp9ihINin2YTYqNiu2YrYqiDZhdit2YXYryDYp9mE2LPZitivCjxAZGlzY3Vzc2lvbnMubWljcm9zb2Z0LmNvbT4gd3JvdGU6Cj4gaSBoYXZlIGNyZWF0ZWQgYW4gYWNjZXNzIGRhdGEgYmFzZ...

Converting Date to Work Week...
Hello, I'm trying to convert a colum of entry dates to work weeks. I have a helper row for month and year but I do not know if there is a quick way (or a built in formula in excel) to determine the "work week" (within a month). For example: ENTRY DATE: Month: Work Week: 8/26/05 August 4 8/19/05 August 3 etc. Is there a formula that I can drag down this list of about 1,800 rows with all different months? Thanks, PZan -- PokerZan ------------------------------------------------------------------------ PokerZan's Profile: ...

Date and time calculations
Hello, I have a problem with a formula in wich I like to add up an amount of hours to a date/time value. Please find below an example of what I am trying to do. Value A1: 15/03/2005 22:00 (dd/mm/yyyy hh:mm) Value A2: 5 (hours) In cel A3 I would like to get the value of A1+A2 (result 16/03/2005 03:00) Can someone suggest what formula I must use? Thanx very much! Robert =a1+(a2/24) Format the way you like. (5 hours is 5/24ths of a day.) Robert wrote: > > Hello, > > I have a problem with a formula in wich I like to add up an amount of > hours to a date/time value. >...

How attach data in a row so it can be sorted by the date column?
I have a four spread sheets all the same that I have copied and pasted into one. I need to know now how to sort the rows by the date column. When I select the date column and hit the tool bar a-z button only the dates sort and not other information in the adjacent columns. What can I do? Hi! Select the entire range that you want to sort. Goto Data>Sort. Sort by the column that contain the dates. Biff >-----Original Message----- >I have a four spread sheets all the same that I have copied and pasted into >one. I need to know now how to sort the rows by the date column. W...

Possible to chart data for dates implicit within a range?
I have a list of computer programs with start and end dates for each. I need to determine how many programs were running on my system on any given day. Can I get this data for individual days between the start and end dates without creating columns for each intermediate day? Ex.: Program 1 ran from 01/01/2005 to 01/14/2005. Program 2 ran from 01/06/2005 to 01/22/2005. Is it possible to chart the total number of programs running on 01/08/2005 without manually creating a column for that date? Thanks, Nechama You can compute this with formulas. Star with data in A1:C4 as follows: ...

Grouping dates on a chart
I have a workbook with 12 sheets in it, one for each month of the year. Each sheet has the day of the week in column B, several other values in columns C -- J and a transaction value in column K. What I want to do is create a chart that groups the dates into days of the week and then displays a bar showing the sum of all transactions on each of those days in the month. So, for example, the sheet for March would show: 1 x x x x x x x x 1250.00 2 x x x x x x x x 80.00 3 x x x x x x x x 3000.00 4 x x x x x x x...

Can I set date reminders in MS Excel?
I need to have date reminders in MS Excel. Is there a way out? do, what do you mean by a date reminder? Do you mean, like, how many days left till a project is do?? or maybe like a a schedule program to remind you of an appoinment??? "do" wrote: > I need to have date reminders in MS Excel. Is there a way out? I read this reply message and I would like to know the same thing. A message to pop up if a project is due in a day. "Lizzieope" wrote: > do, > what do you mean by a date reminder? Do you mean, like, how many days > left till a project ...

date and time formatting
I have a formula in which the date and time are present in cells, bu when the destination cell returns them, they are in their numerica value. I need them to appear in the destination cell the same way the do in their home cells. here is the formula: ="p-v-w-"&B154&" ph "&E154&" fax "&H154&" ** "&X154&" * "&Y154&" "&AA154&" * "&" * "&AB154&" "&(Y4)&" - "&(Y5) y4 and y5 are the date and time cell refs Thanks and Happy ...

calculate dates in Excel 2000
I have a spreadsheet with two date columns, a holiday start date and a holiday finish date. I need to calculate the amount of holidays taken but if I subtract one from the other, I get the wrong answer. Eg 01/01/05 and 10/01/05, would be 10 days taken, however the formula returns only 9. Any ideas please. -- Trainer Look at the NETWORKDAYS() function: will that do it for you? Your Jan 1 through Jan 10 example includes two weekends, so NETWORKDAYS will not be your best choice if you count weekend days as holidays. If you say "I'll be on holiday from the 7th through the 10th&...

Inser the current date into a field in a Table
Hi, I want to insert the current date into "LastUpdateCost" field fromthe "CYCLETICKETNUMBER" table. I have the following code but is notcomplete. Can you help me????? strSql = "INSERT INTO CYCLETICKETNUMBER (LastCostUpdate) Date ;" db.Execute strSql, dbFailOnErrorThe code is incomplete because I don't know the what code I need to dowhat I want. Thanks for your help. Hope you have a nice day.JC jeanhurtado@gmail.com wrote:> Hi, I want to insert the current date into "LastUpdateCost" field from> the "CYCLETICKETNUMBER" table. I h...

Date Code
Here is my code that I'm having a problem with. I want the programming to start evaluating from cell I2 through the rest of the column. Is there a different way to write the code. Well the workbook opens, I get a message that says 'Type Mismatch' and highlights the boolean section of the if statement. Private Sub Workbook_Open() Dim Target As Range Application.Workbooks(1).Worksheets(5).Activate ActiveSheet.Range("I2").Select For Each Target In Range("I2:I20") If Target.Value <> "" And DateValue(Target.Value) - DateValue(Now)...

word document date
Version: 2008 Operating System: Mac OS X 10.6 (Snow Leopard) Processor: Intel I'm trying to create an invoice for last month + I cannot stop word from automatically inserting today's date. This occurs in a template I downloaded from microsoft. Go to Insert menu choose Date and time choose desired format and make sure that automatically update is unchecked. > Go to Insert menu choose Date and time choose desired format and make sure that automatically update is unchecked. <br><br>Thank you. ...

Why is date accessed and date modified different?(Excel 2000)
Hi, I am puzzled by the fact that one of my excel documents shows a different modified time than the the accessed time. I do not remember saving(i wrote down the last time I saved and the time modified) and this time is changed. I don't share computers with anyone. Does the system modify these files sometimes? Thanks, Ed Some functions such as NOW and TODAY are "volatile" meaning that they will cause a calculation of those cells when any calculation is mode, including updating those values when the workbook is open. -- Cordially, Chip Pearson Microsoft Most Valuable Profe...

Shipment/Invoice Needs to Allow Different Date for Invoice
Right now the Processing of a Shipment/Invoice in Receiving Transaction Entry (Version 9.0) generates an Invoice that has the same date as the Receiver. This can create issues with when the inovice is processed for payment and with discounts taken that a vendor may dispute. (the invoice date does not match the vendor's invoice date ). If you change the date used when processing this transaction to be the invoice date and not the receipt date, then that creates problems with not giving a true representation of when the product was actually received, especially if the date is around...

PLEASE HELP! need conditional formatting related to date, blank cells and today's date
I want to create a conditional formmatting formula that will highlight a cell if that cell is blank and another cell that has a date in it is more than 30 days from today's date. So, if J2 has a date in it and that date is greater than or equal to 30 days past today's date AND K2 is blank, I want to highlight K2 red. If K3 is not blank I dont want it to be highlightd. can anyone help me with the correct formula/conditional formatting? Thanks so much! Try this in the Formula box of the CF dialogue: =3DAND(K2=3D"",J2-TODAY()>=3D30) If J2 is in the past (not clear from...

Date Cell In Chart Title?
How do I keep a date cell value in the dd/mm/yyyy format vs. it converting back to a serial number? The Chart Title refers to a cell with the date in the correct format but when I concatenate it into the title it reverts back to a serial number. Thank you ...

Outlook 2K Date Navigator
Hi All, I have a user that cannot get the Date Navigator to display in the Outlook 2K calendar. No matter what view he chooses, the only thing that is displayed when he views his calendar is Task Pad. Any suggestions? Thanks & Ciao Hi Tony Open Outlook with the /cleanviews switch to see if that helps. http://www.howto-outlook.com/howto/commandlineswitches.htm Let me know if that helps or not. -- Kathleen Orland Outlook Tips: http://www.outlook-tips.net/ http://www.howto-outlook.com/ "Tony" wrote: > Hi All, > > I have a user that cannot get the Date...

Formula for calculating the diffrence between two dates
suppose i have an product name as A001234-01APR10 which expires after 5 business days that is on 07th apr.. so It should give, on 3rd apr what is its age and on 8th showing as expired.. what will be the excel based formula for this... I'll give you the main tool. In order to calculate the working days (Mon-Thu) between two dates use: =NETWORKDAYS(A1,A2) [where A1 has earliest date, B1 has latest date] I would suggest to use this function - with an appropriate check - to declare Conditional Format in coloring the cell when Expired. Same Function can be used to present the &quo...

Macroless way to post dates in another cell
OK... So here's what I am trying to accomplish Should be simple but every time I try it I get an error... so I giv in. I need to get it set up so that when I enter any sort of value in cel E4 the date is automatically posted in cell I2. So simple yet beyond my comprehension -- Message posted from http://www.ExcelForum.com right click on the sheet tab>view code>insert this Private Sub Worksheet_Change(ByVal Target As Excel.Range) If Target.Address = "$E$4" Then range("e12")=date End Sub -- Don Guillett SalesAid Software donaldb@281.com "HoundofCullin&...

Dates to moths and calculating values for their months
I want to put dates to their months for coloumn A and work out the monthly totals of column B according to month. Not using a pivot table. A B Date Litres 01-Jan-03 4185 05-Jan-03 4132 14-Jan-03 4132 01-Feb-03 4132 01-Mar-03 4616 01-Apr-03 5223 i would like the output to be as follows: A B jan-03 feb-03 subtract jan-03/number of days in jan * 1000 feb-03 mar-03 subract feb-03/number of days in feb * 1000 The problem i have is repeating months in cells fill down A B jan-0...

Day/Date formula
Is it possible to have a function where if you enter the date numerically, eg '30/3/7' it returns the DAY & date, eg 'Fri, 30th March 2007' ? This would obviously work off the computer calander so as to ensure it gets the day of the week correct. Thanks Data > Text to Columns > Next > Next > select Date: DMY > Finish Custom Format ddd, d mmmm yyyy "86" wrote: > Is it possible to have a function where if you enter the date numerically, eg > '30/3/7' > it returns the DAY & date, eg 'Fri, 30th March 2007' ? > ...

manual archive & modified date
Hi, When I archive manually in Outlook 2002, all modified dates are set to the archive date. Is this normal ? TIA Willy Yes, since you archived that date, the modified date should match. --� Milly Staples [MVP - Outlook] Post all replies to the group to keep the discussion intact. All unsolicited mail sent to my personal account will be deleted without reading. After furious head scratching, WDW asked: | Hi, | | When I archive manually in Outlook 2002, all modified dates are set to | the archive date. | Is this normal ? | | TIA | Willy ...

Locate month and year from range of date from another sheet
Hi all, I want to locate month and year from range of date through April, 05 to Feb.,06 How? Thanks and regards RRS =MONTH(A1) will return the index number of the month, e.g. 01/01/06 in A1 will return 1 =YEAR(A1) will return the year if you want the month in text like January =TEXT(A1,"mmmm") or just =A1 and custom format mmmm -- Regards, Peo Sjoblom Northwest Excel Solutions www.nwexcelsolutions.com (remove ^^ from email address) Portland, Oregon "Rao Ratan Singh" <RaoRatanSingh@discussions.microsoft.com> wrote in message news:FB179953-45B2...