Count Total Days For A Year
May i know the code for counting total days for a year?
Thank you.
View Complete Forum Thread with Replies
See Related Forum Messages: Follow the Links Below to View Complete Thread
No Of Days In Year???
Hi,
Please tell me how do i calculate no of days in year. Year or date will be enter by user and my application should show the number of days in that year. In vb is there any function to find out number of days in given year.
Thnx in advance,
Shailesh
Listing All Days Of A Year
How can my app list all days of a year?
The days must exist so it needs to know if the month has 30 or 31 days etc. It should receive it's date by looking up the
current year set in the windows clock.
Number Of Days In A Year???
Does anyone know a function that will return :
1. The number of days in the year
and
2. The number that represents todays date.
(e.g.
001 = 01 January
002 = 02 January
'
032 = 01 February
'
338 = 04 December)
Thanks,
Imelda.
Total # Of Days Function In VB...
Hello,
I am looking for a function in VB which gives me the total number of days from January 1st - todate (say Jan1st to March 1 = 59 days) . But I couldn't find.
Also is there a function to find the "Week of the day" like Jan 18th 2001 is third week in this year.
Any help is greatly appreciated.
thanks
nath
Get Total Days And Weeks
hi, i am just wondering if there was any way of getting the total amount of days in the months, and weeks in each month. I know this is quite easy to set in code but was just wondering if there was a function for it.
thanks
Reset Count On Jan. 1 Of Each Year
In a database i developed a couple years ago the customer wanted to reset the Order Number to 0000 at the begining of each year. This number then is incremented through code throughout the year as orders are placed and prefixed by the current year automatically so that the resulting number looks something like this: 2001-0137. At that time I just added a menu option that allowed him to manually reset the counter to 0000. That was easy enough to do since I had a table called settings that had 1 record with one field called OrderNumber. This works fine if he remembers to reset it. This year he was a week into the new year before he remembered it.
I am adding several requested features and changes and would like to know if anyone has an idea how I can automate the process. How can I make sure it doesn't keep resetting if launched several times on January 1 and how can I make sure it gets done automatically if the computer isn't launched on January 1 at all, say not until the 5th. I've had no luck thus far. Any help would be appreciated.
Thanks,
Rev. Michael L. Burns
Count Of Weekdays In A Year
Dear Gurus,
I want to know any built in function in vb6
will give me the count of weekdays in a Year
eg: In the Year 2003
52 Sundays
52 Mondays
52 Tuesdays
53 Wednesdays ..........
Thanks
matvbthreads
Count Days
Is there any VB code to get total days of each 12 months when i put month name
eg:- we knew that , January = 31 days February = 29 Days March = 31 days April =30 days and so on. So if i enter January , i want to get '31' in other column .
Can anybody help me? I know IF formula can do this. But I don't want to copy and paste the very long IF formula . so that i need a VB code.
Count Days
Hi experts,
I am doing a program to plan tasks and i need to count days :
i need to know for example that the 6 june 2004 is the 184th day of the year.
(it s just an example i don't even know if it s true )
The argument will be 6 june 2004 (or a date format like 06-06-04) and the answer should be 184.
How can i do this ?
Thank you
Count The Days
Hi,
Is there a vb function that takes two dates (with format DD,MM,YY) and tell me the number of days in between the two. I normally wouldn't need something like this but with the new active directory tokens you have to supply the number of days to leave a user active, instead of a date.
Thanks!
Count Down Days
Hi All
I have an access database with a field called Days remaining, and what i would like to do is have the field linked to the computers date so that if the field has 365 days, every day that passes it counts down 1 so 364, 363 etc, i have no idea where to start, please can someone help me.
Many thanks
Count Working Days
I have another complex question too. I had been trying so hard, but in vain. I am sure those experts out there can help me.
I am doing a program for staff allocation of my company. We are allocating hours for a staff on a weekly basis, that is, on every saturday of each month. It goes like this.
Eg: The month February has 4 saturdays. The full working hours of a staff is 40 hours.
February
7 14 21 28
But the availability of the staff is calculated in percentage. The calculation is as follows:
Availabality=No. of hours per month assigned to a staff / Total no. of working hours of a month * 100
My confusion is that the hours are assigned on a weekly basis regardless of the month. In the above example, I could not get the working hours because, the days before 7th is in the previous week and also the days after 28th includes the days of the next month.
Can anybody help me please?
Thanks
Count Working Days
Hi all,
Is there a way to get the number of working days of a particular month?
Please help.
Thanks
Count Working Days
Hi,
is there an easy ways to count working days between 2 dates, i.e. not including saturdays and sundays.
cheers
Nick
Count The Week Days Only In Excel
I had to create this function to count the week days (minus saturday and sunday) between to dates.
Function GetWorkDays(StartDate As Long, EndDate As Long) As Long
' returns the count of days between StartDate - EndDate minus Saturdays and Sundays
Dim d As Long, dCount As Long
For d = StartDate To EndDate
If Weekday(d, vbMonday) < 6 Then
dCount = dCount + 1
End If
Next d
GetWorkDays = dCount
End Function
I then have to call it from a cell with: =GETWORKDAYS(startdate,enddate)
Is there a way to do it with a formula? I dont want to create the module in every worksheet I create. I have a lot of users that will use this function, so the simpler the better.
How To Count The Duration Time Within 2 Days?
hi all,
i just want to ask about how to count the duration time within 2 days?for example from 01/08/2005 to 06/08/2005 manually count as 5 days and 120hours.can the system do it?please help.tq in advance.
Help With Total Count In Text Box
Hi, I am kinda new in vb- I need help with wedge scanner that every scann can total a count to text box.
If box.Text = "" Then
box.Text = 0
End If
End Sub
Listview Sub-total Count
Hi,
I not sure if this is possible, I hope I can explain my thoughts. Is it possible to count all values in a listview, and place the subtotal in another listview.
Example:
first listview looks like the following:
Letter Item
===========
a East
b West
a West
c East
d East
b West
What I would like to do is count how many times each "letter" appears in the listview1, and place the result in another listview:
2nd listview result would look like:
Letter No. times
===============
a 2
b 2
c 1
d 1
I hope that makes sense, I imagen the statement to use something like the countif statement in excell.
Many thanks for any peices of advise, I really do appreciate it.
Rgds,
Dan.
Auto Count Total
I have created a logon system for users using my computer, but i want it so that after three incorrect attempts it automatically shuts down the computer, i already have the code to make the computer shutdown but i need to know how to create a running total system that starts at 0 and adds 1 for every incorrect attempt
SQL Averages From Total Count
I've got an mdb that holds name, num1, num2 as fields in a record. I need to load some of the data into a listview/flexgrid type control. I've written the correct SQL statements to take the avg(num1), avg(num2), and group them by name without a hitch. Here's the problem--What I want to do is get the total from num1 for each name, total of num2 for each name, and get an average by dividing avg(num1)/avg(num2) and group it with the proper name and load it into a control.
Do I have to get the totals grouped by name, then perform the calculation, then load it into the control for viewing, or can it be accomplished in a SQL statement?
Thanks for any help--
Guph
Get A Total Line Count Of An .mdb
Hi there....I have been working on an access 97 project for the past few months and am up to 8 modules and 40 odd forms. Just for curiousities sake...is there a way to calculate the total line count of the entire project???
Total Record Count
I have been racking my brain trying to figure this one out. I am still trying to put my record count on the bottom of my VB Form. In a seperate module I have input the following
Public Report
Public TotalHeld
Then on my form load I have put this:
Private Sub Form_Load()
TotalHeld = datNBR.Recordset.RecordCount
Report = 1
lblTotalHeld.Caption = "of " & TotalHeld
End Sub
and this:
Private Sub cmdNext_Click()
If datNBR.Recordset.EOF Then
datNBR.Recordset.MoveLast
MsgBox "This is the Last Record."
Else
datNBR.Recordset.MoveNext
Report = Report + 1
lblReport.Caption = "Report " & Report
End If
End Sub
I can get a running total as I click the "Next Button" but I cannot get the total number of records to show up.
HELP!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!!
Mike Deveau
Beginner Forever
Count Number Of Days Excluding Sundays
I am going to count the number of days difference of one date from the other, but, excluding Sundays. How can I detect how many sundays are there in between the two dates?
Please help me.
Rif: Count No Of Days Between 2 Dates In 'dd/mm/yyyy' Format
StartDate = CDate(Form.TextBoxStart.Text) or (Form.LabelStart.Caption)
EndDate = CDate(Form.TextBoxEnd.Text) or (Form.LabelEnd.Caption)
Format Start and End Dates "dd/mmm/yyyy" same will become 01 Jan 2003
DaysInterval = DateDiff("d", StartDate, EndDate)
I think your error is due to different operating system settings for dats i
e. :
02/01/2003 can be interpreted as Feb 1 2003 or Jan 2 2003 depending on
regional setting; error seems not arise if day or month two digits are >12
Hope will help
Michele Rossi
-------Messaggio originale-------
Da: visualbasic-l@OpenITx.com
Data: sabato 03 maggio 2003 09.22.33
A: email@removed
Oggetto: [visualbasic-l] Count No of Days between 2 Dates in 'dd/mm/yyyy'
Format
Archive Page - http://www.ittoolbox.com//I/visualbasic.asp
Hi all,
I=A1=A6m encountering the problem in calculating the numer of
days correctly between 2 dates after I convert the date format from
=A1=A5mm/dd/yyyy=A1=A6 to =A1=A5dd/mm/yyyy=A1=A6.
Appreciate your expertise to enlighten me to get the
computation works correctly.
Thanks and regards,
YC
Dim x As Variant
Dim y As Variant
Dim z As Variant
Dim a As Variant
Count No Of Days Between 2 Dates In 'dd/mm/yyyy' Format
<html><div style='background-color:'><DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3>Hi all,<?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3><SPAN style="mso-tab-count: 1"> & nbsp; </SPAN>I・m encountering the problem in calculating the number of days correctly between 2 dates after I convert the date format from .mm/dd/yyyy・ to .dd/mm/yyyy・.<SPAN style="mso-spacerun: yes"> </SPAN><o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3><SPAN style="mso-tab-count: 1"> & nbsp; </SPAN>Appreciate your expertise to enlighten me to get the computation works correctly. <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3> <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3>Thanks and regards,<o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3>YC <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt"><FONT size=3> <o:p></o:p></FONT></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Dim x As Variant<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Dim y As Variant<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Dim z As Variant<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">Dim a As Variant<o:p></o:p></SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><SPAN style="FONT-SIZE: 10pt; mso-bidi-font-size: 12.0pt">
SQL Statement Count Total Quantity
Anyone has any idea on how to calculate the transaction date by model and then count out the total quantity for that transaction date for that day?
For example:-
I want to set a target 2th March 2005 starting to count for the transaction date and time.Then,it will pick out only the transaction date(trans_date) and time which i set in the database for me by following the certain model.Anyone can tell me how to write for the coding?Thank you.
DataGrid Total Column Count
Here is a question in VB6 you could do something like this to go through all the cells in a MSHFlexGrid1
PHP Code:
With MSHFlexGrid1
For iCol = 0 To MSHFlexGrid1.Cols - 1
If iCol = 1 Then
mstTitle = .TextMatrix(iRow, iCol)
End If
If iCol = 2 Then
mstDescription = .TextMatrix(iRow, iCol)
End If
If iCol = 13 Then
mstRecordID = .TextMatrix(iRow, iCol)
GetRecordID
End If
stColumnHeader = MSHFlexGrid1.ColHeaderCaption(0, iCol) & ": "
stDisplayText = stDisplayText & stColumnHeader & .TextMatrix(iRow, iCol) & vbCrLf & vbCrLf
Next
End With
Now in VB.NET I am trying to do something like that when a user clicks a cell in a DataGrid.
PHP Code:
With DataGrid2.Item(iCol, iRow)
For iCol = 0 To DataGrid2.VisibleColumnCount
stColumnHeader = DataGrid2.CaptionVisible.ToString & ": "
stDisplayText = stDisplayText & stColumnHeader & DataGrid2.Item(iRow, iCol) & vbCrLf & vbCrLf
Next
End With
But in this line "For iCol = 0 To DataGrid2.VisibleColumnCount" instead of DataGrid2.VisibleColumnCount I want the total column count any ideas?
Numbering And Count Total Data.
code below i found it from internet. it's ok and could run on my system where the data can be exported from the system in vb6 to ms excel. i want to make some adjustment in terms of numbering and total number of data. based on the original coding, the result in the ms excel does not show these two things. i have tried to edit the code, but still did not work. i would like to show the numbering at before the No Pelajar's cell and at the bottom of all records will show the total number of records. here is my the code. i do not completely understand at the Italic+Bold codes.
Code:
If Trim(cmbJbtn.Text) <> "" Then
Screen.MousePointer = vbHourglass
Connect ' function from Module1.bas
Set ExlObj = CreateObject("excel.application") ' Initialize the excel object
ExlObj.Workbooks.Add' Add an excel workbook
' Get the required data from the database
rsGetAllData.Open "select P.pel_ID, P.pel_nama, T.tes_tajuk from " & _
"pelajar P, tesis T " & _
"where P.pel_ID = T.pel_ID " & _
"And P.pel_jabatan = '" + Trim(cmbJbtn.Text) + "'", con, adOpenDynamic, adLockOptimistic
If Not rsGetAllData.EOF Then
ExlObj.Visible = True
With ExlObj.ActiveSheet
' Print the heading and columns
.Cells(1, 3).Value = "SENARAI NAMA DAN TAJUK TESIS. BAHAGIAN : "
.Cells(1, 3).Font.name = "Verdana"
.Cells(1, 3).Font.Bold = True: .Cells(1, 5).Value = cmbJbtn.Text
.Cells(4, 1).Value = "No Pelajar": .Cells(4, 2).Value = "No Matrik"
.Cells(4, 3).Value = "Tajuk Tesis"
End With
End If
For k = 1 To rsGetAllData.Fields.Count
ExlObj.ActiveSheet.Cells(4, k).Font.Bold = True
Next
Set k = Nothing
NxtLine = 5
Do Until rsGetAllData.EOF
For lc = 0 To rsGetAllData.Fields.Count - 1
' Populate data into the sheet
ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = rsGetAllData.Fields(lc)
If rsGetAllData.Fields.Item(lc).Name <> "DATE" Then
ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = rsGetAllData.Fields(lc)
Else
ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = Format(rsGetAllData.Fields(lc), "dd/mm/yy")
End If
' Autoformat the sheet
ExlObj.ActiveCell.Worksheet.Cells(NxtLine, lc + 1).AutoFormat _
xlRangeAutoFormatList2, 0, regular, 3, 1, 1
Next
rsGetAllData.MoveNext
NxtLine = NxtLine + 1
Loop
' Calculate the total
ExlObj.ActiveCell.Worksheet.Cells(4, 1).Subtotal 4, xlSum, (6), 0, 0, xlSummaryBelow
Screen.MousePointer = vbDefault
Else
MsgBox "Please select a code" & Chr(13) & "and then proceed"
Screen.MousePointer = vbDefault
Exit Sub
here is the original code.
Code:
On Error Resume Next
Dim lc, NxtLine, k
If Trim(LstCode.Text) <> "" Then
Screen.MousePointer = vbHourglass
Connect
Set ExlObj = CreateObject("excel.application") ' Initialize the excel object
ExlObj.Workbooks.Add' Add an excel workbook
' Get the required data from the database
rsGetAllData.Open "select ACCODE,CONTROL,TRNOS,DATE,TRCODE,AMOUNT,STAFFNOS from " & _
"TRPC0104 where TRCODE = '" + Trim(LstCode.Text) + "'", con, adOpenDynamic, adLockOptimistic
If Not rsGetAllData.EOF Then
ExlObj.Visible = True
With ExlObj.ActiveSheet
' Print the heading and columns
.Cells(1, 3).Value = "VB TO EXCEL DEMO by Arun Banik"
.Cells(1, 3).Font.Name = "Verdana"
.Cells(1, 3).Font.Bold = True:
.Cells(4, 1).Value = "AC-Code":.Cells(4, 2).Value = "Control"
.Cells(4, 3).Value = "TR-Nos": .Cells(4, 4).Value = "Date"
.Cells(4, 5).Value = "TR-Code":.Cells(4, 6).Value = "Amount"
.Cells(4, 7).Value = "Staff Nos"
End With
End If
For k = 1 To rsGetAllData.Fields.Count
ExlObj.ActiveSheet.Cells(4, k).Font.Bold = True
Next
Set k = Nothing
NxtLine = 5
Do Until rsGetAllData.EOF
For lc = 0 To rsGetAllData.Fields.Count - 1
' Populate data into the sheet
ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = rsGetAllData.Fields(lc)
If rsGetAllData.Fields.Item(lc).Name <> "DATE" Then
ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = rsGetAllData.Fields(lc)
Else
ExlObj.ActiveSheet.Cells(NxtLine, lc + 1).Value = Format(rsGetAllData.Fields(lc), "dd/mm/yy")
End If
' Autoformat the sheet
ExlObj.ActiveCell.Worksheet.Cells(NxtLine, lc + 1).AutoFormat _
xlRangeAutoFormatList2, 0, regular, 3, 1, 1
Next
rsGetAllData.MoveNext
NxtLine = NxtLine + 1
Loop
' Calculate the total
ExlObj.ActiveCell.Worksheet.Cells(4, 1).Subtotal 4, xlSum, (6), 0, 0, xlSummaryBelow
Screen.MousePointer = vbDefault
Else
MsgBox "Please select a code" & Chr(13) & "and then proceed"
Screen.MousePointer = vbDefault
Exit Sub
End If
Count No. Of Days With Start And End Date In DD/MM/YYYY Format
<html><div style='background-color:'><DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Dear all,</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Thank you very much especially to<SPAN style="mso-spacerun: yes"> </SPAN>Vikrams16, Michael Dsa,<SPAN style="FONT-SIZE: 8.5pt; COLOR: black; FONT-FAMILY: Tahoma"> </SPAN><SPAN style="COLOR: black; mso-bidi-font-size: 8.5pt">Pswalia</SPAN> , Tata and <SPAN style="mso-spacerun: yes"> </SPAN>Chris McDonald<SPAN style="mso-spacerun: yes"> </SPAN><SPAN style="mso-spacerun: yes"> </SPAN>for your prompt assistance.<SPAN style="mso-spacerun: yes"> </SPAN>The problem on excluding Sunday from working day is solved now.<SPAN style="mso-spacerun: yes"> </SPAN>But there is another<SPAN style="mso-spacerun: yes"> </SPAN>problem related to number of days counting for a long period.<SPAN style="mso-spacerun: yes"> </SPAN>For instance, with the start date<SPAN style="mso-spacerun: yes"> </SPAN>1 April 2003 and end date 30 April 2003, the number of days appears as 99 days.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> <?xml:namespace prefix = o ns = "urn:schemas-microsoft-com:office:office" /><o:p></o:p></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">I suspect it is caused by my date format dd/mm/yyyy.<SPAN style="mso-spacerun: yes"> </SPAN>However, I have already converted it in my code.<SPAN style="mso-spacerun: yes"> </SPAN>For your info, the number of days calculation works perfectly if I use the date format in mm/dd/yyyy.<SPAN style="mso-spacerun: yes"> </SPAN>Could someone there enlighten me by reviewing the following codes.<SPAN style="mso-spacerun: yes"> </SPAN>Many thanks in advance.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">
Count Total # Of Records In A Text File
Modified from original..................
This code gives me count. But when I click on my rc button it doubles my count. So, first click it gives me 12 (and this is correct. i only have 12 records in my file), 2nd click gives me 24, 3rd click gives me 36 and then it breaks.
Code:
Private Sub cmdRC_Click()
Dim TextLine$, Filename$
Dim FileHandle As Integer
Filename$ = "c:Test.txt"
' Test if the file exists
If Len(Dir(Filename$)) = 0 Then
'If Dir(Filename$) = "" Then
Exit Sub
MsgBox "File Not Found", vbCritical
Else
FileHandle = FreeFile ' This is safer than assigning a number
Open Filename$ For Input As #FileHandle
Do While Not EOF(FileHandle) ' Loop until end of file
Line Input #FileHandle, TextLine$ ' Read line into variable
NumRecords = NumRecords + 1
Loop
MsgBox NumRecords
Close #FileHandle
End If
End Sub
Count The Total Nuber Of Files In A Folder
Hi all,
I am having too many files in a single folder.That files are in same format.
I want to count the total number files .In VB how we can do this?
If any one knows plz help this one.
Thanks and regards,
noorjahan
Excel - Calculating An End Date ( Option To Select Which Days To Count )
I've been playing around with a calendar based Date Calculator in Excel.
The problem I'am having is Calculating the End date based off information selected
and which days have been chosen to be counted.
I've attatched the spreadsheet. It's easier to look at than explain.
any ideas would be greatly appreciated!
DLing Binary Via HTTP; Total Byte Count?
Hi. I've got a little app that downloads a binary file off the web via HTTP. It works great w/ WININET.
I can't, however, for the life of me figure out how to get the total byte count for the file so that I can display a status message, etc.
Any ideas? Thanks.
Date Format, Count No. Of Days & Highlight Date In Calendar
<html><div style='background-color:'><DIV>
<P>Hi all,</P>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Happen to visit this website accidentally and found that its very useful to VB beginner like me. <SPAN style="mso-spacerun: yes"> </SPAN>I have the following problems and would appreciate your kind assistance to enlighten me.<SPAN style="mso-spacerun: yes"> </SPAN>Attached is my file for your checking.<SPAN style="mso-spacerun: yes"> </SPAN></P></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> <?XML:NAMESPACE PREFIX = O /><O:P></O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo3">1)<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN>Sometimes, the number of days is incorrect with a big figure (e.g from 1 to 30 Apr) or even a negative figure after I change the systems date format from mm/dd/yyyy to dd/mm/yyyy.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.25in"> <O:P></O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt 0.5in; TEXT-INDENT: -0.25in; tab-stops: list .5in; mso-list: l0 level1 lfo3">2)<SPAN style="FONT: 7pt 'Times New Roman'"> </SPAN>In calculating the number of days, I need to exclude Sunday.<SPAN style="mso-spacerun: yes"> </SPAN>By using the WeekDay (Calendar1) = 7 method, I still didnt get the correct result.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> </P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><O:P> 3) How to highlight a certain date in calendar with different colour to indicate it's a public holiday ? </O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"><O:P></O:P> </P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Many thanks in advance.<SPAN style="mso-spacerun: yes"> </SPAN></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt"> <O:P></O:P></P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">Best regards,</P>
<DIV></DIV>
<P class=MsoNormal style="MARGIN: 0in 0in 0pt">YC </P>
<DIV></DIV>
<DIV></DIV>
<P><BR><BR></P>
<DIV></DIV>
<DIV></DIV></div><br clear=all><hr>Add photos to your e-mail with <a href="http://g.msn.com/8HMVEN/2746">MSN 8.</a> Get 2 months FREE*.</html>
Week Of Year For A Custom Fiscal Year
Im trying create a function to get the percentage of Fiscal Year elapsed for a fiscal year that started and ends on 10/1/05 and 9/30/06 respectively.
How do I determine: Format "ww" returns week of year (1-53) for a year that starts and ends September and August respectively.
Thanks in advance
Two Question (how To Get Each Day Of Year Year, And Excel)
1#
http://www.wunderground.com/history/...lyHistory.html
edit: I can do this myself (with like 10-30 lines of code), but I am sure there is a easy way...
As you can see that this date is from yesterday (2005/6/14) how would you go about putting the dates of the last 5 years in sDate(1825) (1825 days = 5 years)(so I can one at the time, get the source code and parse the data I want in it)?
2# Excel question:
I did some searching, and I am hoping to get a simple answer here... I got two array's sDate(1825) and sTemperature(1825). How would I go about putting all the data in two colons?
[Resolved}DataReport With Sub Total And Grand Total With Out DataEnvironment
rsTotals.Open " SELECT Account_Type, Tax_Type, SUM(Payment)AS Total " _
& " FROM tbl_TransDetails " _
& " WHERE Entry_Date = # " & Date & " # GROUP BY Account_Type, Tax_Type ", _
dbCCP, adOpenDynamic, adLockOptimistic, adCmdText
With rptSumTotals
Set .DataSource = rsTotals
.Sections("Section1").Controls.Item("txtAccounttype").DataMember = ""
.Sections("Section1").Controls.Item("txtAccounttype").DataField = rsTotals.Fields("Account_Type").Name
.Sections("Section1").Controls.Item("txtTaxtype").DataMember = ""
.Sections("Section1").Controls.Item("txtTaxtype").DataField = rsTotals.Fields("Tax_Type").Name
.Sections("Section1").Controls.Item("txtTotal").DataMember = ""
.Sections("Section1").Controls.Item("txtTotal").DataField = rsTotals.Fields("Total").Name
'for sub total
.Sections("Section7").Controls.Item("fnSumTT").DataMember = "" 'rsTotals
.Sections("Section7").Controls.Item("fnSumTT").DataField = rsTotals!Total
'for grand total
.Sections("Section5").Controls.Item("fnGTotal").DataMember = "" 'rsTotals
.Sections("Section5").Controls.Item("fnGTotal").DataField = rsTotals!Total
.Refresh
.Show
giving error: its looking for payment values instead of Total values. so not able to find.
i placed Function control in Group footer section for sub totals and for grand total in Report footer section.
i am not using Data Environment as Data Source.
SQL is good, with out sub and Grand total i am able to print report with Total. after adding Those two function controls i am getting error.
If i assign rsTotals as DataMember "Type Missmatch error"
Help Me, Thanks in advance
>>>>>>>>>>>>>>>>>>>>>>
Edited by - sreddy on 3/24/2005 9:25:02 AM
VB6 And SQL Server &"Year, Quarter Year Dates&"
Hi every one again.
This is dates again. The Vb and Access is the format I used to retrive records in a graph. I have tried changing it to SQL Server. Int is not recognized. On line help talks about "Q4 FY 2004" but don't know if i'm in the right direction.
Any help would be appreciated.
VB6 and Access
GROUP BY (Int (MachPeriod)), Format (MachPeriod,'dd/MM/yy ,ddd')"
VB6 and SQL Server
GROUP BY (Int (MachPeriod)), Convert (Varchar (20), MachPeriod , 103, ddd)
VB6 and Access
GROUP BY (Year ([MachPeriod]) *12 + Month (MachPeriod)-1), Format (MachPeriod,'MMM, YY')"
VB6 and SQL Server
GROUP BY (Year (MachPeriod) *12 + Month (MachPeriod)-1), Convert (Varchar (20), MachPeriod, Q4, FY)"
Thanks
Pieter
Total Newb Need Total Help
ok im making an rpg.. ive made 2 forms, a main menu screen with my tilte, and Login , Options, Web, and quit buttons... my second form is the login screen.. how do i make it so that when i clcik login, it makes the menu dissapear and the login form apear,
also the same would be for options i guess. as soon as i make a form for that.
after that i want my "web" button to keep the exe open but popup an internet page connecting to my website,
and then quit, i want it to close main menu.
then in my login form, i have a similar thing, but i have a cancel button,
it is set to cancel= true but it dosent do anything, how do i make it so that the login.frm closes and comes back to the main menu??
plz help me out im a total newb.. and i dont know about programmign that much.. also, where can i find a good website that sows all commands with descriptions and examples on how to use them for vb?? plz plz plz help!!
Workbooks.Count Doesn't Return Count
For some reason, Workbooks.Count is returning 0, although a workbook is open. I can force the error by calling it without a workbook open. The call has worked before on the same machine (win2k).
Anybody have any idea why this erratic behavior?
Thanx,
James
Code:
If Workbooks.Count > 0 Then MsgBox "open WBs = " & Workbooks.Count
|