vb6 - How to get preivous month total count -



vb6 - How to get preivous month total count -

i want previous month total day count

code

dim period string period = '01/2011' totdays = datediff("d", txtperiod, dateadd("m", 1, txtperiod))

'this give totaldays of month...

but want total days of previous month

user type current month only, code should validate previous month

expected output

if period = '02/2011' means should display 31 days 'january if period = '03/2011' means should display 28 days 'february

how this...

any help

this worked fine me. also, why have variable period, utilize txtperiod in calculations?

dim dt date dim daysinmonth integer dt = cdate(txtperiod.text) dt = dateadd("m", -1, dt) daysinmonth = datediff("d", dt, dateadd("m", 1, dt))

vb6

Comments

Popular posts from this blog

How do I check if an insert was successful with MySQLdb in Python? -

delphi - blogger via idHTTP : error 400 bad request -

postgresql - ERROR: operator is not unique: unknown + unknown -