A Microsoft Office (Excel, Word) forum. OfficeFrustration

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.

Go Back   Home » OfficeFrustration forum » Microsoft Access » Using Forms
Site Map Home Register Authors List Search Today's Posts Mark Forums Read  

Date changed from 0001 to 2001



 
 
Thread Tools Display Modes
  #1  
Old August 23rd, 2005, 05:59 PM
Marek Papala via AccessMonster.com
external usenet poster
 
Posts: n/a
Default 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  
Old August 23rd, 2005, 07:17 PM
RobFMS
external usenet poster
 
Posts: n/a
Default

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  
Old August 23rd, 2005, 10:47 PM
Douglas J. Steele
external usenet poster
 
Posts: n/a
Default

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  
Old August 24th, 2005, 10:51 AM
Marek Papala via AccessMonster.com
external usenet poster
 
Posts: n/a
Default

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  
Old August 24th, 2005, 06:05 PM
RobFMS
external usenet poster
 
Posts: n/a
Default

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

Posting Rules
You may not post new threads
You may not post replies
You may not post attachments
You may not edit your posts

vB code is On
Smilies are On
[IMG] code is Off
HTML code is Off
Forum Jump

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


All times are GMT +1. The time now is 08:06 PM.


Powered by vBulletin® Version 3.6.4
Copyright ©2000 - 2024, Jelsoft Enterprises Ltd.
Copyright ©2004-2024 OfficeFrustration.
The comments are property of their posters.