Weekending Date

by MYLE 10. June 2010 05:13

I first wrote this function in lotus 123

off top of heap going back 20+ year  +iif((a1 mod 7)>0,a1-(a1 MOD7)+7,a1)) please don't quote me on this

this would of been one of my first function I wrote

 Public Function WEEKEND(dat) As Date
    If IsNull(dat) Then Exit Function
    dat = DateSerial(Year(dat), Month(dat), Day(dat))
    If dat Mod 7 > 0 Then
    WEEKEND = dat - dat Mod 7 + 7
    Else
    WEEKEND = dat
    End If
 End Function

I know the Above Function works in VB 

Work in 

excel

Msaccess

 

Comments

6/10/2010 5:47:18 AM #

stephan

thanks I have use

stephan |

8/5/2010 2:52:57 PM #

travel and hotel

Maybe anyone will identify where the in order to this particular will be from? I'll curious about learning a lot of this.

travel and hotel United States |

Comments are closed

Dislexia

I see people have commented about my style of writting.
Well I have dislexia so spelling is not one of my good points
but when it comes to reading/written code thats the easy bit.

 

 

Poll

What Search Engine Do you use




Show Results

Disclaimer of Liability

While every effort will be made to ensure that the information contained within this website is accurate and up to date, The Company's listed with this web site and any associated parties, make no warranty, representation or undertaking, whether expressed or implied, nor does it assume any legal liability, whether direct or indirect, or responsibility for the accuracy, completeness, or usefulness of any information.

 

Google Ads

Most comments

apply cash advance apply cash advance
1 comments
us United States
cloudy cloudy
1 comments
us United States
mutuelle mutuelle
1 comments
fr France

RecentComments

Comment RSS