Hello,
I am having alot of trouble reading in a date values from a text file
which is exported from another application.
My program is pretty basic, I read in values from a plain text file
which had comma seperated values. I use the input statement to read
the values from the file. eg. Input #1, name, dte1, tme1
The text file conists of lines like;
1.167,08/07/2006,02:16:56.2
If I have my variables defined as strings, name and tme1 read in fine,
the date (dte1) reads in as "8".
I have tried changing the data type of dte1 to date and variant, but
still no luck.
If the values in the text file have a "" around them the program works
fine. But the text file is output from a proprietry piece of software
which i can't change.
Any help or tips will be appreciated.
thanks
Peter 2 1361
"Peter" <px*******@gmai l.comwrote in message
<11************ *********@h54g2 000cwb.googlegr oups.com>:
Hello,
I am having alot of trouble reading in a date values from a text file
which is exported from another application.
My program is pretty basic, I read in values from a plain text file
which had comma seperated values. I use the input statement to read
the values from the file. eg. Input #1, name, dte1, tme1
The text file conists of lines like;
1.167,08/07/2006,02:16:56.2
If I have my variables defined as strings, name and tme1 read in
fine, the date (dte1) reads in as "8".
I have tried changing the data type of dte1 to date and variant, but
still no luck.
If the values in the text file have a "" around them the program
works fine. But the text file is output from a proprietry piece of
software which i can't change.
Any help or tips will be appreciated.
thanks
Peter
I don't know what the problem might be, but have you tried reading the
whole line, and manipulate it after rading it?
Line Input #1, strTextLine
Debug.Print strTextLine
If it works, you could for instance try the Split() function, or other
text manipulation functions to separate into different variables
--
Roy-Vidar
Peter
Read the line in as suggested. Programatically add a pound sign "#" after
the first comma and before the second comma. You will end up with
"1.167,#08/07/2006#,02:16:56. 2".
Access will then easily treat the "#08/07/2006#" as a date.
"Peter" <px*******@gmai l.comwrote in message
news:11******** *************@h 54g2000cwb.goog legroups.com...
Hello,
I am having alot of trouble reading in a date values from a text file
which is exported from another application.
My program is pretty basic, I read in values from a plain text file
which had comma seperated values. I use the input statement to read
the values from the file. eg. Input #1, name, dte1, tme1
The text file conists of lines like;
1.167,08/07/2006,02:16:56.2
If I have my variables defined as strings, name and tme1 read in fine,
the date (dte1) reads in as "8".
I have tried changing the data type of dte1 to date and variant, but
still no luck.
If the values in the text file have a "" around them the program works
fine. But the text file is output from a proprietry piece of software
which i can't change.
Any help or tips will be appreciated.
thanks
Peter This thread has been closed and replies have been disabled. Please start a new discussion. Similar topics |
by: duikboot |
last post by:
Hi all,
I'm trying to export a view tables from a Oracle database to a Mysql
database. I create insert statements (they look alright), but it all goes
wrong when I try to execute them in Mysql, because the dates must have
quotes on each side.
I just don't know how make the dates right.
Well I'll just show you the code and some insert...
|
by: F |
last post by:
Hi
I have posted the question few days back about problem in inserting the
dates in SQL server and thankful to them who replied.
That was solved and this is a nice solution.
http://www.aspfaq.com/show.asp?id=2023
Now I am facing another problem.
I have to get data between two dates. That dates user has to provide and in
|
by: deko |
last post by:
What is it with these dates? What are they so much trouble? All I want to
do is subtract an hour, but not if that makes dtmTest less than dtmClt.
Dim dtmStart As Date
Dim dtmEnd As Date
Dim dtmCtl As Date
Dim dtmTest As Date
Me!cbxEndTime.Requery
Me!cbxStartTime.Requery
|
by: Irfan |
last post by:
Hi All,
I am trying to create a report but having problem with the critiera
selection logic, please help.
I have the following fields
date1
date2
date3
|
by: Eric A. Johnson |
last post by:
I am using scanf (from stdio.h) and having trouble inputting a date. I want
the user to be able to input a date in the format mm/dd/yyyy. I use the
following:
printf ("Please enter your first date in the form of mm/dd/yyyy: ");
scanf ("%i/%i/%i", &date1.month, &date1.day, &date1.year);
where date1 is a struct of type date, defined as:...
| |
by: PC Datasheet |
last post by:
An Access user saw my name in a newsgroup and sent me a request for help on
a project. As part of the project, a list of the dates in a month was
needed. For anyone needing a list of dates in a month, here is what I used:
1. Create a table named TblNumbers with one field named Num and populate
the table with 1 to 31
2. Create a query...
|
by: damon.reynolds |
last post by:
Hello.
I am trying to write an expression to help me pull some data out of my
database. We have a group of people travelling between two dates -
and
Unfortunatley for me, the rooms are different prices in our block (a
set of four dates) and outside the block.
The block begins on 2/1/07 and ends on 2/4/07 (4 total room nights)
|
by: Giordano |
last post by:
I am trying to construct a report menu that will allow the user to
select any combination of 3 variables from 3 combo boxes (Select
Subject/SelectCategory/Date Range). There are 2 possible options for
each combo ie <Allor a specific value . That means there are 8
possible outcomes from the user selection process.
The SQL for the report is...
|
by: evilcowstare via AccessMonster.com |
last post by:
Hi, I have searched the forum for answers on this and to be honest as a
novice I find it a bit confusing so apologies if it is simple.
There are some searches that I want to apply to my database.
1. To search for all records between 2 dates and display them in a report
2. To be able to show all records which have a selection against them...
|
by: marktang |
last post by:
ONU (Optical Network Unit) is one of the key components for providing high-speed Internet services. Its primary function is to act as an endpoint device located at the user's premises. However, people are often confused as to whether an ONU can Work As a Router. In this blog post, we’ll explore What is ONU, What Is Router, ONU & Router’s main...
|
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...
| |
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. ...
|
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...
|
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...
|
by: agi2029 |
last post by:
Let's talk about the concept of autonomous AI software engineers and no-code agents. These AIs are designed to manage the entire lifecycle of a software development project—planning, coding, testing, and deployment—without human intervention. Imagine an AI that can take a project description, break it down, write the code, debug it, and then...
|
by: conductexam |
last post by:
I have .net C# application in which I am extracting data from word file and save it in database particularly. To store word all data as it is I am converting the whole word file firstly in HTML and then checking html paragraph one by one.
At the time of converting from word file to html my equations which are in the word document file was convert...
|
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
| |
by: muto222 |
last post by:
How can i add a mobile payment intergratation into php mysql website.
| |