473,885 Members | 2,468 Online
Bytes | Software Development & Data Engineering Community
+ Post

Home Posts Topics Members FAQ

Importing a CSV file with a Date/Time field, the field nulls itself out

133 New Member
I currently importing a csv file with an import specification declaring the field values. one field is a date/time field. when the csv file is imported, it clears the date field with null values. the code is listed below.

Any suggestions?

As a work around, the import specification declares the date field as a text to maintain the values. thereafter, the data is inserted into a new table with the date field updated with the CDate function.

Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acImportDelim, "SO_Data Import Specification", "SO_Data", "C:\Documents and Settings\DowlinMM\My Documents\Development\SciQuest_SupplyMgr\UH Mgt Inventory Rptg\Sciquest Data\SO_Data.csv", True
  2.  
May 3 '11 #1
0 1541

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

Similar topics

4
1608
by: mbosco51 | last post by:
Hi. I am tring to setup an asp script that will do the following... If file date/time is within last 10 minutes then response.redirect to file else do something else end if The text file is not located on the webserver. I created a virtual directory on the webserver which allows me to response.redirect to the
1
4485
by: Pierre Maricq | last post by:
Hi, I am using Win2000 and Access2000. I need to build build a macro or write a VBA in Access that would screen all files contained in a directory on my C drive (files are structrured DAT files ) and update an Access table with the following information: (1) Filename (variable lenght) (2) Modified File Date/Time
2
6916
by: Andrew | last post by:
Hi, friends, I use the following C# code to find out date/time for all files in a directory: (Those files are retrieved from VSS). VSS_Item.Get(ref tempFile, (int) SourceSafeTypeLib.VSSFlags.VSSFLAG_TIMEMOD); if (File.Exists(tempFile)) FileDate = File.GetLastWriteTime(tempFile).ToString(); However, some of FileDate values are the same as shown in window Exploer and
0
1622
by: Thomas Homan | last post by:
Hello, Is there a method in the FtpWebRequest that allows for preservation of the file being transferred original date and time in vs2005 vb? In the FTPSample the method is to set up stream for incoming file and create. This sets the file date and time to the system date/time when file is actually transferred rather than retaining the date and time of the file as it sits on the FTP server.
6
13602
by: Mike Charney | last post by:
Is there a way to check a files date and time stamp from VBA in access. I have a need check a date stamp on a file that I am importing. Thanks in advance, Mike m charney at dunlap hospital dot org
4
6366
by: sbowman | last post by:
I have a table with help desk ticketing information. There is a Date/Time open, Date/Time closed field both formatted as: MM/DD/YYYY hh:nn:ss I need to calculate the difference between these two times and then calculate the average of the difference. How do I go about this??? Help is much appreciated... Shelley
1
2052
by: trevorjhughes | last post by:
I am running an import of some date/time values that have come from a Cognos query. These values are in a CSV file and I want to import them into access. The CSV file would show the value thus: 01/12/2007 3:15PM However when I import into Access, Access creates import errors ad won't import the values. The import spec shows them as date/time. Would it be possible to import the values into a text field and convert them to a...
1
2092
by: 6afraidbecause789 | last post by:
Hi - I am using a Date/Time Picker popup form for users to choose a a date and time for use on a separate entry form. The date/time on the entry form is actually entered automatically as a date/time stamp when a user enters a record. So, the popup form is only necessary when a user needs to change the date/time. To make this more user-friendly...there will be times when a user will be away from the computer, and therefore, will have to...
2
4130
by: Mimi | last post by:
In Access 2007, I have successfully imported a text file with fixed width fields. However the import did not correctly interpret a date. In the text file the date field had no delimiter, was just MMDDYYYY. This column appears empty in my table. It doesn't seem like this is a hard thing to do. Any suggestions? Marianne
9
5275
by: JeremyI | last post by:
I am writing code to import assessment information about a building from an Excel file (populated by a mobile interviewer on a laptop) into an Access database. With much trial and error, I've hit upon a way of importing all the necessary information, but have run into one last problem when establishing my fully-prepared temporary table to use for appending to the permanent assessment data table. One of the fields in the form, AImportDate, is...
0
11172
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. Here is my compilation command: g++-12 -std=c++20 -Wnarrowing bit_field.cpp Here is the code in...
0
10770
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 captivates audiences and drives business growth. The Art of Business Website Design Your website is...
0
10427
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 choice of these technologies. I'm particularly interested in Zigbee because I've heard it does some...
1
7987
isladogs
by: isladogs | last post by:
The next Access Europe User Group meeting will be on Wednesday 1 May 2024 starting at 18:00 UK time (6PM UTC+1) and finishing by 19:30 (7.30PM). In this session, we are pleased to welcome a new presenter, Adolph Dupré who will be discussing some powerful techniques for using class modules. He will explain when you may want to use classes instead of User Defined Types (UDT). For example, to manage the data in unbound forms. Adolph will...
0
7139
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 into image. Globals.ThisAddIn.Application.ActiveDocument.Select();...
0
5808
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 the same network. But I'm wondering if it's possible to do the same thing, with 2 Pfsense firewalls...
0
6010
by: adsilva | last post by:
A Windows Forms form does not have the event Unload, like VB6. What one acts like?
1
4627
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
3
3245
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 effective websites that not only look great but also perform exceptionally well. In this comprehensive...

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.