Converting To Cash Using Str.format?
Apr 5, 2009
I still have troubles understanding what the deal is with the whole String.Format("{0:C}" thing. How would I implement it into this code and how exactly does it work?
Public Class Form1
Private Sub computedeposit(byval dblrate As Decimal, ByVal dblfutureval As double, ByVal intyears As integer, byref dbldeposit as double)
dblrate = dblrate / 100
dbldeposit = dblfutureval / ((1 + dblrate) ^ intyears)
[code].....
View 13 Replies
ADVERTISEMENT
Jun 7, 2011
I'm creating a VB app that uses the Infragistics UltraGrid to display data from 2 JD Edwards files. Before the data is displayed, first I need to convert 2 date fields that are in JD Edwards Julian date format (i.e., 111158 for 6/07/11....the 158th day of this year) to mmddyy format.
MCTS: Web Apps, MCTS: Windows Apps, MCTS: SQL Server 2005, MCP: Windows XP Professional, A+, Network+, Linux+, Security+, Master CIW Designer, SCJP
View 1 Replies
Jan 20, 2011
I have been looking for a way to convert bytes down into another unit and append the unit format to the end and return it. I have found a few posts about it but I didn't perticularly want to write that much code that they listed, so I designed "my own" (I'm sure I'm not the only one who has done this method).Since I am pretty new at all this, I was wondering if anyone could let me know if there are any problems with how it would process the information and perhaps make it faster.[code]
View 29 Replies
Mar 8, 2011
i am trying to retrieve data from sql server into vb.net but i have some issues with date/time the date format in sql like '2011-03-08 23: 59: 59. 999'and in visual basic i am using DateTimePicker as custom format like 'yyyy-MM-dd'and the query that i wrote it in vb.net to retrieve data from sql is:select * from TBL where TBL .t_date between CONVERT(datetime,''+'" + DT1.Value + "'+'', 101) and CONVERT(datetime,''+'" + DT2.Value + "'+'', 101)[code]how i can let the user insert the items 'A','BB','CC' between IN brackets by choosing the items from combobox?
View 2 Replies
Jun 11, 2009
converting EDI X12 format to XML file .
View 3 Replies
Feb 5, 2007
way to do this without third party components? I have been trying to do it using a reference to Acrobat, but I I cant make it work... Specifically I would like to pass the Save As dialogue a filename and extension....
here is the code I am working with:
AcroXApp = CType(CreateObject("AcroExch.App"), Acrobat.CAcroApp)
'Removing toolbar buttons from the user interface
With AcroXApp
[Code].....
View 4 Replies
Jul 21, 2011
I want to convert vox file to wav file, which I got code from planetsourcecode -- I am using it ..below is the code....but this code plays the wav file but no clarity of the voice. low volume and all.. know about this audio format conversion
Module moduleVOX2WAV
Dim
WaveHeader() As Int32 =
[Code].....
View 1 Replies
Apr 15, 2011
I'm doing some homework for my VB class where I have to write a program that creates an invoice for a customer. I'm having an issue with converting the name input from the format of (Last, First) within the same textbox to (First Last) in a listbox via a function. I have done everything but dealing with the strings and I'm at a loss. I'm also having to create an invoice number with the first two letters of the last name and also the last four numbers of the zip code in an address line such as City, State, Zip. Manipulating these strings is killing me.Below is the code that I have written, manipulation of the strings must be in one function for each the invoice and the and the name issue....
=Dim custinvoicenum As String
Private Sub btnProcess_Click(ByVal sender As System.Object, ByVal e As System.EventArgs) Handles btnProcess.Click
Dim custname As String 'Name of customer[code]......
View 7 Replies
May 8, 2011
i have a problem converting a datetime of a specific format , you may notice a colon in between the date and time.
Dim time As DateTime
Dim str As String = "26/02/2009:18:37:58"
time = DateTime.Parse(str, "dd/MM/yyyy:HH:mm:ss")
Console.WriteLine(time)
View 2 Replies
Feb 21, 2011
I'm working on an application that is used by English and French users. French users have their computer's regional settings that make the decimal "," instead of "." and the number spacing " " instead of "," So, a French user will input a value "9,78" in a text box. I need to make this value "9.78" so I can safely store it in a database. How can I convert this to the US number format?
View 8 Replies
May 19, 2012
This code I converted VB to C#. But i need to know how can use Hex in c#
private string ConvertStringToHex(string sText) {
int lCount;
string sHex;
string sResult;
for (lCount = 1; (lCount <= sText.Length); lCount++) {
[Code] .....
View 1 Replies
Apr 24, 2009
I'm having some trouble converting the format of a date in .NET 2008...
Dim currMonth As Date
currMonth = Format(Now, "mmm")
From this code, I need to extract today's date in the format of "mmm" (so it should return.. "Apr")This worked in vb6 but not in .Net, I keep getting some sort of conversion error.. I looked at using theformatdatetime option but it doesnt have the format that I need... only short date/long date...that kind of thing.
View 1 Replies
Jun 14, 2011
I have a program, that allows writers to save there quotes. The quotes are saved in a xml file. Everything works as it should but when I load a saved quote it still comes up in xml format. I need to load a saved quote in a plain text format and I also want to be able to give the output file print functionality. I was thinking of making the output file a html file which opens up in a web browser, this of course already has print functionality, is this at all possible.
[Code]...
View 4 Replies
Aug 2, 2009
There are not very many good DVD burners out there for free so I was looking at making my own Data DVD buring (so no converting to DVD format just yet). How is this done? I need a starting point, I can do the basic GUI and add files to a listbox or something but the burning part. How does this get done???
View 1 Replies
Oct 23, 2009
I am in process of designing an architecture for an application. Following is the high level requirement.
1. The basic requirement is to convert a flat file into XML
2. The input flat file can have various formats, the delimiters, the data positions may vary.
3. The output XML format is predefined. There is a specification defined in a word format, which I think I need to define it as an XSL or XSD.
I am planning to follow some design pattern. Not decided yet. The architecture should be flexible to extend the input file formats and accommodate any changes in output specification.
View 2 Replies
Dec 1, 2010
I have this example and it gives me exception "Conversion from string x to dateTime is invalid"
here is my method to validate Datetime. Example Date string : "27/03/1985"
Public Function validateDateColumn(ByRef FieldName As String) As Boolean
[Code]...
View 3 Replies
Dec 11, 2010
I have been working on creating a carving tool to extract data on an image file.So am able to get the data present in the image in the form of hexadecimal.My problem is that i need to convert the hexadecimal back to its original format, that is for example get back a jpeg file back in its normal form.What am getting -> FF D8 FF EO.........FF D9 ( for a jpeg file in hex
View 6 Replies
Jul 12, 2010
How to convert the integer number into currency format in vb.net 2008.
View 4 Replies
May 22, 2012
I've successfully implemented OpenXML that takes the bookmarks within a document and replaces them. Unfortunately it only works with .docx and from what I understand .doc is not compatible with the OpenXML format. So, what I'm wondering is if I can take that WordprocessingDocument and convert it to a .doc when users try and download it.
View 2 Replies
Oct 25, 2010
I have to Convert my Application to a Multilanguage platform including Other Cultures and their formats. I Cannot convert anything..
For example
rd.RD_STARTDATE.Text = Convert.ToDateTime(dsRsv.Tables("RSVDetail").Rows(i).Item("RD_STARTDATE")).ToString("d", CultureInfo.DateTimeFormat.FullDateTimePattern)
Why does this always result in a " Cannot convert to 'Interface IFormatProvider'." ? How I can Proper handle this conversion of DateValues?
View 2 Replies
Sep 30, 2010
I am using drupal database in one of my application. Drupal profile saves date in following format:
a:3:{s:5:"month";s:1:"2";s:3:"day";s:2:"18";s:4:"year";s:4:"1995";}
I can read this with data reader but how to convert in a proper display like DD/MM/YYYY or YYYY/MM/DD
View 2 Replies
Dec 1, 2010
I Have this date "27/03/1985" and because it starts with days i can't convert it to datetime.
View 2 Replies
Apr 3, 2012
I am using a VB.NET(VS2010) to read data from serial port. I have 8-bit data to collect through rs232. This data is represented numbers. What reading method should I use and how to convert it to double format?
View 3 Replies
Mar 14, 2012
in my application, I am pulling in items from a microsoft project file using mpxj - one of the items I need is the predecessors. The way I am able to pull the predecessor is using a build in function of mpxj which returns a type of java.util.list - I can save this to variable as an object, but I need to find a way to bring the data to a format I can easily use so I can store it into a database. Listed below is the line of code I am using to pull the predecessors from the project file.
Dim predecessors = task.getPredecessors
and here is the result when putting a tracepoint in to get the value of predecessors
[[Relation [Task id=4 uniqueID=45577 name=Standards Training - Round 2] -> [Task id=3 uniqueID=45576 name=Process Excellence Training]]]
Even if I could get the above as a string, I could work with it enough to get the data I need. The above example is where there is 1 item in the predecessor list, but sometimes there are multiple items. Here is an example of the tracepoint when there are multiple items.
[[Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=47 uniqueID=45857 name=Organizational Assessment]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=49 uniqueID=45859 name=Document Deliverables]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=56 uniqueID=45866 name=Infrastructure Deliverables]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=58 uniqueID=45868 name=IT Deliverables]], [Relation [Task id=63 uniqueID=45873 name=Complete IP Binder] -> [Task id=60 uniqueID=45870 name=Organizational Deliverables]]]
View 3 Replies
Jan 5, 2010
I'm having a problem converting a string to a datetime format. the string is depicting an hour, for example 08:00, but in the mysql database it stores that as 2008/00/00 00:00 any idea how to solve this?
[Code]
View 3 Replies
Sep 9, 2011
Basically, the code checks if the amount being entered is check. If it is check, insert the check value into chckval. If it is cash insert the cash value into cashval. So far, it is half working. It inserts the check into the check fieldname and inserts 0 into cash fieldname. What is not working is inserting cash into cash fieldname if the money is cash. It inserts the cash into cash fieldname as it should but it also inserts the same amount into check fieldname. This is not good. If it is cash and it is inserted into cash fieldname, I want check value to be 0.
Here is the latest code.
For x = 1 To 5 Step 1
dedval = Gridview1.FindControl("ded" & CStr(x))
chckval = Gridview1.FindControl("chck" & CStr(x))
chcknumval = Gridview1.FindControl("chcknum" & CStr(x))
checkboxval = Gridview1.FindControl("chckBox" & CStr(x))
[Code] .....
I think there is some issue with the
IF chckval.Text <> "" And Not checkboxval.Checked Then
statement
View 1 Replies
May 28, 2011
converting the number of frames (in a video) to a number/time format. For instance, say a video has 110,212 frames at 23.976 fps, it works out to 01:16:36 (hh:mm:ss) with 18 frames remaining. I would like to format the result in a Textbox like the following:
[Code]...
View 3 Replies
Dec 18, 2010
Is there a way of converting a unix time stamp to normal format time and date in .NET?
View 3 Replies
Dec 4, 2011
I have a USB cash drawer that acts as a com port (lets assume com2)
any ideas on how I can open it? there is not really any documentation with it.
View 8 Replies
Dec 16, 2009
I am still working on a POS application in VB.Net 2003. What I need to do is check the state of the cash drawer. I want to make sure the drawer is closed before a cashier is allowed to move on to the next sale. The cash drawer I am using is a MMF ECD200 (not sure if this will make a difference). Here is the code I am using to open the drawer:
[Code]...
View 12 Replies