473,566 Members | 2,908 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Apply formatting to FieldInfo array

2 New Member
Hi,
I am a learner who is automating some data from reports to ease my month end pressures. The code below is used to open a text file (a report from our ERP) and seperate the text into columns. Two of the arrays return dates. However, the dates get returned in both US and UK formats. Is there a way to apply formatting at this stage? Formatting later is too late as the date format is already corrupted.

Workbooks.OpenT ext Filename:=myFil ename, _
Origin:=xlWindo ws, StartRow:=1, DataType:=xlFix edWidth, FieldInfo:= _
Array(Array(0, 1), Array(4, 1), Array(14, 1), Array(25, 1), _
Array(51, 1), Array(60, 1), Array(72, 1), Array(77, 1), Array(98, 1), _
Array(119, 1), Array(125, 1), Array(133, 1), Array(144, 1), Array(159, 1), Array(174, 1))

I am working on sperating the days, months and years seperately and then rejoing later in the program. However, I want to continue to improve my knowledge of VB.

Thanks for any help offered.
Mike
Oct 3 '07 #1
0 1110

Sign in to post your reply or Sign up for a free account.

Similar topics

7
745
by: Chad Z. Hower aka Kudzu | last post by:
I have a typed dataset that is on a WinForm and I have labels that have their text properties bound to fields in a data table. The values are of type decimal. When I dispaly them in the label, I want to add a currency symbol and also insert comma's for thousands separators. Is there anyway to specify the formatting for a label or a field...
1
1083
by: Klaus Jensen | last post by:
Hi! If I have a label that displays a price, and I want to apply formatting to it ({0:C} for instance - displays the value as currency), how do I do that? It seems like it is not possible. What would then be the easiest and most correct way to make sure the contents of the label is displayed in a certain way? I know I could do some...
2
1643
by: John Mason | last post by:
Hi, I have a Datagrid control with an edit command column, which has a PushButton ButtonType. I am trying to apply formatting to the plain grey button, to make it look more appealing on screen. I would like to change the font-size and the set the background color, the foreground color of the text, and also set a border color and width.
6
1331
by: Brad | last post by:
I guess I still have not grasped the logic of formatting a simple label or text box. Why would the following not work? I need the resulting label to display currency. lblAmtDue.Text = CInt(txtEntries.Text) * 1.5 lblAmtDue.Text.Format("$#,##0.00")
0
5934
by: KH Tay | last post by:
Hi, I can able to run the Excel Macro command in VB6. Unfortunately , VB.Net always prompt Array - no declaring. I've insert the Excel references, and it is still not working. Can anyone help me ? Thanks. Source code:- xl.Workbooks.OpenText(Filename:="C:\SMT\SMT.TXT", Origin:=Excel.XlPlatform.xlWindows, StartRow _ :=1,...
0
1873
by: DWalker | last post by:
VBA, as used in Excel 2000 and Excel 2003, has a function called Array. It's commonly seen in statements like the following: Workbooks.OpenText Filename:=ACFileName, _ StartRow:=1, DataType:=xlFixedWidth, FieldInfo:=Array(Array(0, 2), _ Array(9, 1), Array(18, 1), Array(33, 1), Array(49, 1), Array(71, 1), _ Array(75, 1), Array(89, 1),...
10
9289
by: Peter | last post by:
VS 2003 .NET 1.1 What is the fastest way to move 2 dimensional Array of objects into a DataTable, besides using a loop? I have a about 30,000 elements in my array and I have to move it into a DataTable Thank You
2
4407
by: dcyale | last post by:
I have a report with the following paragraph: ="This BA presents a " & & " determination for the " & & " and associated habitat. We would appreciate you processing the biological opinion by " & & ". If you have any questions, please contact ODOT Biologist " & & ", " & & ", " & & ". " The problem is that the phone number is showing...
0
1428
by: RCM | last post by:
I'm having trouble formatting a currency value in a template field. I have searched around and found all sorts of suggestions on how to handle a BoundField, most importantly the necessity of setting HTMLEncode to false in order for the format string to apply. But I can't figure out how to apply formatting when I have a column that is a...
0
7584
by: Hystou | last post by:
Most computers default to English, but sometimes we require a different language, especially when relocating. Forgot to request a specific language before your computer shipped? No problem! You can effortlessly switch the default language on Windows 10 without reinstalling. I'll walk you through it. First, let's disable language...
0
7893
Oralloy
by: Oralloy | last post by:
Hello folks, I am unable to find appropriate documentation on the type promotion of bit-fields when using the generalised comparison operator "<=>". The problem is that using the GNU compilers, it seems that the internal comparison operator "<=>" tries to promote arguments from unsigned to signed. This is as boiled down as I can make it. ...
0
8109
jinu1996
by: jinu1996 | last post by:
In today's digital age, having a compelling online presence is paramount for businesses aiming to thrive in a competitive landscape. At the heart of this digital strategy lies an intricately woven tapestry of website design and digital marketing. It's not merely about having a website; it's about crafting an immersive digital experience that...
1
7645
by: Hystou | last post by:
Overview: Windows 11 and 10 have less user interface control over operating system update behaviour than previous versions of Windows. In Windows 11 and 10, there is no way to turn off the Windows Update option using the Control Panel or Settings app; it automatically checks for updates and installs any it finds, whether you like it or not. For...
0
7953
tracyyun
by: tracyyun | last post by:
Dear forum friends, With the development of smart home technology, a variety of wireless communication protocols have appeared on the market, such as Zigbee, Z-Wave, Wi-Fi, Bluetooth, etc. Each protocol has its own unique characteristics and advantages, but as a user who is planning to build a smart home system, I am a bit confused by the...
0
3643
by: TSSRALBI | last post by:
Hello I'm a network technician in training and I need your help. I am currently learning how to create and manage the different types of VPNs and I have a question about LAN-to-LAN VPNs. The last exercise I practiced was to create a LAN-to-LAN VPN between two Pfsense firewalls, by using IPSEC protocols. I succeeded, with both firewalls in...
0
3626
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
2085
by: 6302768590 | last post by:
Hai team i want code for transfer the data from one system to another through IP address by using C# our system has to for every 5mins then we have to update the data what the data is updated we have to send another system
0
926
bsmnconsultancy
by: bsmnconsultancy | last post by:
In today's digital era, a well-designed website is crucial for businesses looking to succeed. Whether you're a small business owner or a large corporation in Toronto, having a strong online presence can significantly impact your brand's success. BSMN Consultancy, a leader in Website Development in Toronto offers valuable insights into creating...

By using Bytes.com and it's services, you agree to our Privacy Policy and Terms of Use.

To disable or enable advertisements and analytics tracking please visit the manage ads & tracking page.