473,403 Members | 2,222 Online
Bytes | Software Development & Data Engineering Community
Post Job

Home Posts Topics Members FAQ

Join Bytes to post your question to a community of 473,403 software developers and data experts.

Will not restore a date

489 256MB
My application was originally written in Access XP, I switched to Access 2007 and now I'm having a problem. One of my users is in Italy and of course their date is formated as D/M/Y. In my application there is a restore function that restores all data back to the database. For some reason with 2007 Access the date will not restore. I've had the user send me his backup files so I could see what was happening. I switched my computer language to Italian so that the date format would be correct but when I restored the data the date field in the database is left blank. Because of this the program will not work correctly. Does anybody have any idea why this is happening and how to fix it. Thanks for any help.
Jul 12 '10 #1
5 1599
NeoPa
32,556 Expert Mod 16PB
Are the dates stored as DateTime fields?

PS. You should understand that DateTime fields do not store dates as formatted. Storage and format are entirely independent. The backups are another matter, specially if they are not stored there as DateTimes. See Literal DateTimes and Their Delimiters (#) for a related issue in SQL.
Jul 12 '10 #2
nico5038
3,080 Expert 2GB
Hmmm, I've solved these problems in the past by setting the Regional Settings (See configuration form) as needed.
Access does look up these settings for default date and number format manipulation.

Nic;o)
Jul 12 '10 #3
CD Tom
489 256MB
I use the standard
Expand|Select|Wrap|Line Numbers
  1. DoCmd.TransferText acExportDelim, , vtable, apppathx, True
to export the data for backup, I've attached one of the files that should restore the date, it will restore everything but the date field.
Yes the table is formated for Date/Time.
Attached Files
File Type: txt params.txt (1.7 KB, 314 views)
Jul 12 '10 #4
NeoPa
32,556 Expert Mod 16PB
If your data is stored in the table as DateTime, but the backed up data is as you've attached, then this certainly involves taking a text string and converting it to a date. Notice, this is not a SQL literal, so the SQL standard is not applied here. The data I saw ("13/06/2010") is certainly formatted as a European style date string, so how it is interpreted (d/m/yyyy rather than m/d/yyyy) is indeed important.

I must admit though, that like Nico, I would expect this to work fine for you if you'd set the default date style properly in your PC (probably necessary to do before Access is first loaded mind you). Of course, that example date wouldn't give a problem anyway, as it would be recognised by the fact that there are fewer than 13 months, but other date data could well be misread unless properly configured before the import or restore.
Jul 12 '10 #5
nico5038
3,080 Expert 2GB
OK, found two problems:
1) Your time has no ":" but "." as separator and that will need to be changed. (The 0.00.00 must become 0:00:00 or removed)
2) The Date format in the Regional settings needs to be set to the European format dd mm yyyy.

Having changed that did import the date without errors.

Nic;o)
Jul 12 '10 #6

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

Similar topics

3
by: Ned Hart | last post by:
I'm formatting my mirrored drives and installing a third drive for raid 5 to add more space. I have backup exec. Can anyone tell me the best way to backup SQL so I can be sure it will restore...
4
by: Raquel | last post by:
How are the following two commands different as far as the 'end result' of the restores is concerned: 1. db2 RESTORE DB mydb 2. db2 RESTORE DB mydb TABLESPACE In other words, in the above...
13
by: Andy K | last post by:
Hi , I'm wondering what's going on with a restore I'm trying to do . My DB2 version is a 7.2 on a Linux RH ES 2.1 . I've copy a recent backup that was on NAS for a test on my machine . I...
1
by: alpha_male | last post by:
Can anybody help to create code which would create new table from linked table and additionally will add date stamp for the name of new table? For example tblHello is linked table and the code...
11
by: Lauren Quantrell | last post by:
I already figured out (the hard way) I need to convert all my date parameters into USA format before executing my stored procedures where dates are used as parameters. (Format(StartDate, "m/d/yyyy...
1
by: viki.sanjeeva | last post by:
Hi, There is a date field in JSP form where user will enter date in dd-mm-yyyy format. Now before saving into DB2, I want to validate the date format against dd-mm-yyyy format and then save into...
9
by: Rizwan Karedoa | last post by:
Hi experts, I am developing an application, I am using vb 2005 and access. I have many date fields, When I am saving through Query for default date I save 1/1/1500 so when i find that date agian I...
4
by: lesperancer | last post by:
it looks like this will save many versions of a relationship window, but based on the fact that the same tables are displayed in the relationship window and it will restore versions of what was...
8
by: Rob Wilkerson | last post by:
Surprisingly (at least to me), there doesn't seem to be a built-in function to validate a date value (like, say, is_date()). Given that, is there a best practice for determining whether a value is...
34
by: -Lost | last post by:
I'm REALLY liking this so far. And for those who welcome something a little less cryptic than what the resident date guru offers, here's a chance to try something fairly elegant and definitely...
0
by: Charles Arthur | last post by:
How do i turn on java script on a villaon, callus and itel keypad mobile phone
0
by: emmanuelkatto | last post by:
Hi All, I am Emmanuel katto from Uganda. I want to ask what challenges you've faced while migrating a website to cloud. Please let me know. Thanks! Emmanuel
0
BarryA
by: BarryA | last post by:
What are the essential steps and strategies outlined in the Data Structures and Algorithms (DSA) roadmap for aspiring data scientists? How can individuals effectively utilize this roadmap to progress...
1
by: nemocccc | last post by:
hello, everyone, I want to develop a software for my android phone for daily needs, any suggestions?
0
by: Hystou | last post by:
There are some requirements for setting up RAID: 1. The motherboard and BIOS support RAID configuration. 2. The motherboard has 2 or more available SATA protocol SSD/HDD slots (including MSATA, M.2...
0
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...
0
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,...
0
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...
0
agi2029
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,...

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.