If this is your first visit, be sure to check out the FAQ by clicking the link above. You may have to register before you can post: click the register link above to proceed. To start viewing messages, select the forum that you want to visit from the selection below. |
|
|
Thread Tools | Display Modes |
#1
|
|||
|
|||
Date changed from 0001 to 2001
Hello,
I need to pass to AS/400 date "0001-01-01" as a default date. In my system I use convention #1/1/001# but MS Access automatically changes date to #1/1/2001# How to do? Best Regards, Marek Papala -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200508/1 |
#2
|
|||
|
|||
Marek
Not sure how you are performing the processing, but you do have a few things available to you. Would I be correct to say that "0001" refers to the year 2001? There is the Month(), Day() and Year() functions available in VBA. Break up the date (from Access) into variables as strings. With that, you can concatentate the date for the AS/400 as you need it. HTH -- FMS Professional Solutions Group http://www.fmsinc.com/consulting Software Tools for .NET, SQL Server, Visual Basic & Access http://www.fmsinc.com FMS Advanced Systems Group http://www.fmsasg.com/ "Marek Papala via AccessMonster.com" wrote in message ... Hello, I need to pass to AS/400 date "0001-01-01" as a default date. In my system I use convention #1/1/001# but MS Access automatically changes date to #1/1/2001# How to do? Best Regards, Marek Papala -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200508/1 |
#3
|
|||
|
|||
Dates in Access cannot be prior to the year 100.
-- Doug Steele, Microsoft Access MVP http://I.Am/DougSteele (no e-mails, please!) "Marek Papala via AccessMonster.com" wrote in message ... Hello, I need to pass to AS/400 date "0001-01-01" as a default date. In my system I use convention #1/1/001# but MS Access automatically changes date to #1/1/2001# How to do? Best Regards, Marek Papala -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200508/1 |
#4
|
|||
|
|||
Hello,
no I need exactly pass the date 0001-01-01. I've found somewhere in Internet that default value of date i VB is 0001-01- 01 00:00:00. I've tried to not to initialize the variable and assign it to another, but in debugger I see that value of this variable is 00:00:00 instead. Best Regards, Marek -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200508/1 |
#5
|
|||
|
|||
Marek
Use the VBA functions Month(), Day(), and Year() along with the CStr() function to get the string you need to pass. For example: 8/24/2005 Month() = 8 ... convert to string Cstr(Month()) ... strMonth = "8" Day() = 24 ... convert to string Cstr(Day()) ... strDay = "24" Year() = 2005 ... convert to string Cstr(Year()) ... strYear = "2005" Now that you have string representations of the date (broken out), then format it the way you need to send it to the AS/400. HTH -- FMS Professional Solutions Group http://www.fmsinc.com/consulting Software Tools for .NET, SQL Server, Visual Basic & Access http://www.fmsinc.com FMS Advanced Systems Group http://www.fmsasg.com/ "Marek Papala via AccessMonster.com" wrote in message ... Hello, no I need exactly pass the date 0001-01-01. I've found somewhere in Internet that default value of date i VB is 0001-01- 01 00:00:00. I've tried to not to initialize the variable and assign it to another, but in debugger I see that value of this variable is 00:00:00 instead. Best Regards, Marek -- Message posted via AccessMonster.com http://www.accessmonster.com/Uwe/For...forms/200508/1 |
Thread Tools | |
Display Modes | |
|
|
Similar Threads | ||||
Thread | Thread Starter | Forum | Replies | Last Post |
Deligate changed date of meeting but date stayed the same on Caled | bsantona | Calendar | 0 | May 10th, 2005 07:32 PM |
Calendar - can it be changed to open on the last date accessed? | PhilW | Calendar | 0 | May 9th, 2005 02:20 PM |
Making Excel generate Access-Like Reports | VJ7777 | General Discussion | 15 | September 12th, 2004 05:48 AM |
maintaining calendar formats when date range has changed | david wilson | Publisher | 1 | July 14th, 2004 05:26 PM |
Date Dilema! | Kagsy | General Discussion | 8 | July 13th, 2004 03:45 AM |