CLng(CDate) mean

arunakumari02

Registered User.
Local time
Today, 15:29
Joined
Jun 2, 2008
Messages
91
What does this Clng(CDate(Nz(TxtYear))) mean?

Where TxtYear is 2008.

Thank you
 
Clng(CDate(Nz(TxtYear)))

The above formula needs little correction in the syntax:

Clng(CDate(Nz(TxtYear,0)))

1. The inner most expression NZ(TxtYear,0) means if the TxtYear Field value is Null then take value 0 as output.
2. The output from TextYear is to convert into a Date. If TextYear=2008 then the output of CDate will be 30/06/1905.
3. The Date is again convert into a Long Integer, still the output will be 2008 but takes up 4 byte memory to store it. An Integer Value Range can be from -65536 to +65537 and uses 2 bytes of memory, but Long Integer Number Range is –2,147,483,648 to 2,147,483,647.

http://www.msaccesstips.com
 

Users who are viewing this thread

Back
Top Bottom