Click here to Skip to main content
15,884,099 members
Home / Discussions / Visual Basic
   

Visual Basic

 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 4:44
Member 1186689320-Feb-20 4:44 
AnswerRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
ZurdoDev20-Feb-20 5:28
professionalZurdoDev20-Feb-20 5:28 
AnswerRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Richard MacCutchan20-Feb-20 4:58
mveRichard MacCutchan20-Feb-20 4:58 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 5:39
Member 1186689320-Feb-20 5:39 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Dave Kreskowiak20-Feb-20 7:13
mveDave Kreskowiak20-Feb-20 7:13 
GeneralRe: VB.NET/MS ACCESS Fill column and all entries in the that column with the current date Pin
Member 1186689320-Feb-20 5:42
Member 1186689320-Feb-20 5:42 
QuestionHow to create new DateTime of months, going back 12 months Pin
jkirkerx17-Feb-20 8:32
professionaljkirkerx17-Feb-20 8:32 
AnswerRe: How to create new DateTime of months, going back 12 months [it works] Pin
jkirkerx17-Feb-20 8:52
professionaljkirkerx17-Feb-20 8:52 
Call the functions
Dim M9 = AmCommon.MakeMonthStartDate(-8)
Dim M10 = AmCommon.MakeMonthStartDate(-9)
Dim M11 = AmCommon.MakeMonthStartDate(-10)
Dim M12 = AmCommon.MakeMonthStartDate(-11)

Dim sM2 = AmCommon.MakeMonthStopDate(-1)
Dim sM3 = AmCommon.MakeMonthStopDate(-2)
Dim sM4 = AmCommon.MakeMonthStopDate(-3)
Dim sM5 = AmCommon.MakeMonthStopDate(-4)
Functions
Public Shared Function MakeMonthStartDate(byVal monthsBack as Integer) As DateTime

    Dim month = DateTime.Now().AddMonths(monthsBack)
    Dim fd = FirstDayOfMonth(month)
    Return New DateTime(month.Year, month.Month, fd.Day, 0, 0, 0)

End Function
Public Shared Function MakeMonthStopDate(byVal monthsBack as Integer) As DateTime

    Dim month = DateTime.Now().AddMonths(monthsBack)
    Dim ld = LastDayOfMonth(month)
    Return New DateTime(month.Year, month.Month, ld.Day, 23, 59, 59)

End Function

Public Shared Function FirstDayOfMonth(ByVal sourceDate As DateTime) As DateTime
    Return New DateTime(sourceDate.Year, sourceDate.Month, 1)
End Function

Public Shared Function LastDayOfMonth(ByVal sourceDate As DateTime) As DateTime

    Dim daysInMonth = DateTime.DaysInMonth(sourceDate.Year, sourceDate.Month)
    Return New DateTime(sourceDate.Year, sourceDate.Month, daysInMonth)

End Function
If it ain't broke don't fix it
Discover my world at jkirkerx.com

AnswerRe: How to create new DateTime of months, going back 12 months Pin
Richard Deeming18-Feb-20 2:20
mveRichard Deeming18-Feb-20 2:20 
GeneralRe: How to create new DateTime of months, going back 12 months Pin
jkirkerx18-Feb-20 7:18
professionaljkirkerx18-Feb-20 7:18 
GeneralRe: How to create new DateTime of months, going back 12 months Pin
Richard Deeming18-Feb-20 7:42
mveRichard Deeming18-Feb-20 7:42 
QuestionHOW TO CREATE RDLC REPORT AND CALL IN VS 2013 Pin
Member 146289475-Feb-20 0:39
Member 146289475-Feb-20 0:39 
AnswerRe: HOW TO CREATE RDLC REPORT AND CALL IN VS 2013 Pin
Richard MacCutchan5-Feb-20 2:11
mveRichard MacCutchan5-Feb-20 2:11 
QuestionMS Acces Form (VBA) - Listview to Textbox etc Pin
Jayvee Pacanza1-Feb-20 17:35
Jayvee Pacanza1-Feb-20 17:35 
QuestionRe: MS Acces Form (VBA) - Listview to Textbox etc Pin
Richard MacCutchan1-Feb-20 21:32
mveRichard MacCutchan1-Feb-20 21:32 
AnswerRe: MS Acces Form (VBA) - Listview to Textbox etc Pin
Jayvee Pacanza2-Feb-20 4:40
Jayvee Pacanza2-Feb-20 4:40 
GeneralRe: MS Acces Form (VBA) - Listview to Textbox etc Pin
Mycroft Holmes4-Feb-20 11:50
professionalMycroft Holmes4-Feb-20 11:50 
QuestionExcel Import Pin
RajaMohammed.A31-Jan-20 22:45
RajaMohammed.A31-Jan-20 22:45 
AnswerRe: Excel Import Pin
JR2125-Feb-20 19:51
JR2125-Feb-20 19:51 
QuestionExcel VBA seems to read an old value from a cell Pin
idkd30-Jan-20 18:02
idkd30-Jan-20 18:02 
QuestionRe: Excel VBA seems to read an old value from a cell Pin
Eddy Vluggen30-Jan-20 22:01
professionalEddy Vluggen30-Jan-20 22:01 
AnswerRe: Excel VBA seems to read an old value from a cell Pin
Mycroft Holmes31-Jan-20 10:41
professionalMycroft Holmes31-Jan-20 10:41 
AnswerRe: Excel VBA seems to read an old value from a cell Pin
ZurdoDev31-Jan-20 10:49
professionalZurdoDev31-Jan-20 10:49 
Questioncant get Ascii art to display after the RLE file Pin
Member 1472117930-Jan-20 0:57
Member 1472117930-Jan-20 0:57 
AnswerRe: cant get Ascii art to display after the RLE file Pin
phil.o30-Jan-20 1:10
professionalphil.o30-Jan-20 1:10 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.