Tracker
 ASP PHP JavaScripts MySQL MS Access MSSQL Subjects/Titles Post Text/Content
HOME    TRACKER    Visual Basic

# If Today Is Saturday Or Sunday Then...

## Can some please provide a code snippet that accomplishes the following?:If today's date = Saturday or Sunday then endelse 'existing code hereend ifThank you for your help!

What Can I Do With Saturday And Sunday
Hi i have a datediff clausure to calculate the days between 2 dates i need to exclude the saturday and sunday in total days. How can i do that?

Saturday And Sunday
Hi Someone can help me

I want count between to date how many Saturday and Sunday (Or Weekend)

Thanks!

JP

Help In Detecting Saturday And Sunday
Hello,

i create a simple payroll system and it's almost done, i have one problem on how to detect saturday and monday in current pay period (1-15 or 16-31).

Exclude Saturday & Sunday ?
Is there a kind of function while calculating interval between dates excluding Saturdays and Sundays ?

Using DateDiff("d", x, y) I get the whole interval !!!

How To Find Last Day(Saturday/Sunday) And Date Of A Week
How to find Last Day(Saturday/Sunday) and Date of a week

Listing Second Saturday
Hi all

I need to list all the dates of second saturday for two months from the date entered by user as input.

Does anyone know a short and quick method to accomplish this. there are many long methods but i need a short and simple one.

bye

Last Saturday! (the Date, That Is)
What would be the best and easiest way to get the date of the LATEST saturday?

I thought of some code that I'm pretty sure would take way too many lines by not using the appropriate function.

Thanks

Saturday&#039;s Between To Dates
Like you've got nothing better to do:

My situation:

Knowing a MIN DATE and a MAX DATE, how can you display all SATURDAY dates that fall between these two dates in say, a combo box? I am trying to make user pick a valid SATURDAY date.

Any suggestions. I know I could evaluate the date to detremine it's a Saturday, but I figured the way I described might be easier for the user.

Sunday Or Not
I am creating something like a year planner.

I need to know whether a given date (October 12, 2005) falls on a sunday or not

I searched in google, this forum and MSDN but couldn't find an answer

How Do I Find The Date Of This Saturday?
I'm a programming neophyte so needless to say I need some help on some
VB scripting.

I need to create some code to find what month it will be this coming
Saturday. I also need to do the same for the week # of the month this
Saturday. And finally, the Year of the month this Saturday.

Could someone help me with this?

Thanks
n8

HOw Could I Check It Is Sunday?
I am writing a payment program and every sunday , we have to pay twice. How could I write a program that If today is Sunday then the program should doble of payment. Thank in advanced =)

Sunday Teaser
hi All interested
I have attached a sample project
Its giving me a lot of headaches
Basic Problem
Data in Datagrid not saving
Do this
1. Run the project
2 .Press Show form
3 .Press Show DAta
4. change the data in any of FLD1,Fld2 etc (Not KeyID as its primary Key)
5. Press Enter
The value on screen has changed
6. Click Hide Data
7. Click Show Data again

The value reverts back to the original value
To make it work you have to
do same as above up to no 5
Then press Down Arrow
Click hide data
click show data
Now the update is permanent
Can anyone solve this
JamesAnthony

Third Sunday Function
What I want to do is, when the date-type variable "mdbtGameDate" changes, run a function to find if the current date is the third sunday of the month, and if so, set the "CurrentVar" boolean-type variable to true. How would I do this?

Getting The Date For Next Sunday ??
I'd like to find a way to get the date for the next Sunday from the current date.  How would I go about this?

DateTime Property-How To Determine The 1st And 3rd Saturday?
How to determine the 1st and 3rd Saturday?
I want to apply special condition to the 1st and 3rd saturday of every month ,but not all saturday.
Anyone know how to write the code?
thx a lot...

Make Week Start On Saturday
Hi, I have a Report in Access that contains a field called Seminar Date, among other fields. The report is grouped by Seminar Date using the group by week option in the Report wizard of Access. However, the week starts on a Sunday according to Access. Is it possible, using VB or any other method, to have the week start on a Saturday instead?

Thanks for any help!

Data Report Question (I Know It's Saturday, But I Need Help Bad!)
Is there any way for me to display info on a data report like this?

FirstName LastName

Kidname
Kidname
Kidname

Currently I'm getting this:
FirstName LastName

Kidname

FirstName LastName

Kidname

FirstName LastName

Kidname

Does anyone know how I can make my report look like the first example?

Thank you!!!!

How To Find The Previous Saturday&#039;s Date
I know it is possible, but is there a quicker way and/or
trick to find the previous Saturday and/or a particular day?

Any advice would be greatly appreciated.

Jay

how would i go about adding the next four sunday dates into a combobox?

Get The Date Of The First Sunday Of The Week
Hi,

I will pass the week num ( 1/2/3/4/5) and week day(1/2/3/4/5/6/7)
for a date varaible.

I need to get the date of the first sunday or second sunday or first monday
or second monday of the month.
As per the parameters passed above , I need to get the date values.
Any VB functions to get this.

Pls let me know reg this ..

Thanks,
ksk

Two Quick Questions For Sunday
Hello all.
Just a quick question. If I declare a Variant type variable, should I set it = nothing when I am finished with it? I don't get an error when I do this . I want to make sure that all resources are released.

Second quick question. If I create a ComboBox control at run time, can I make it have a particular index number? I am using the index number to tie the combo to a particular column in an MSHFlexGrid. The problem is that the number of combo's needed is increasing as the programme gets more complex and I would like to reduce the 'weight' if I can.

Thanks.
DRW

How To Find The FIRST Sunday Of EACH Year?
How in the world can I do this?
Thanks

Determine Last Sunday Of Month ?
Guys, Do you have any piece of cide to determine the last sunday of any given month ?
Actually I want to find the day the daylight time chnages dynamically. Since we know that it is on the last sunday of cotober,If I could find the last sunday of any given month in a given year I can do it.
Any idea folks ?

San.

Combobox Populated With Sunday Dates
I have a VB 6.0 form used for Crystal report selection criteria. I need 1 combobox that will display Sunday (start of week) dates for a selected year. I will then populate the 2nd text box with the Saturday (end of week) dates.

I am not a VB programmer and have had little experience. Need some direction on where to start.

How To Get The Date(Moday - Sunday) Info
Hi,

Code:

Any solution given if i would like to get next week "moday- sunday".

For Example :
Today is 08/08/2008 - wednesday
Next Week 24/08/2008 - Moday

----------------------------------------------------
Mon(24/08/2008)| Tue(25/08/2008)| Wed(26/08/2008)|
-----------------------------------------------------

VbForum ... is the best for vb...

Recognizing Sunday (RESOLVED Thanks DaVBMan You Da MAN! )
Ok, now that we have the dateadd function figured out, I was wondering if anyone knew of a short script for the computer to recognize sundays date and then pend it +1 day if it falls on Sunday. . . .

Example. . . .

I have a customer who said they can do (xx activity) in 3 days, but in 3 days the day will be sunday, but instead of manually changing it to 06-21, what I would like is to get VB to recognize the day and then +1 it to Monday?

sound complicating? It would basically work in conjunction with this coding:

Dim c As String
c = DateAdd("d", 2, Now) "If date = vbSUNDAY then DateAdd'("d", 1, Now)
c = Format(c, "mm/dd")

Edited by - Bryan Duncan on 6/15/2004 6:15:38 PM

Saturday Summer Doldrums Graphic Effects Grabbag
Well it looks like the forum is into the yearly Saturday Summer Night doldrums.

I've recently come out of the doldrums myself (and "re-centered' a bit after my dark thoughts thread) so I want to throw myself into doing something...

You know it's so frustrating to sit around and wait for someone to post an interesting question about some special or unique graphics technique/effect.

Instead, you get an endless stream threads from newbies where you end up giving some canned answers, like --yes, you need to turn on AutoRedraw, use Bitblting, and, most certainly, a memDC backbuffer would probably help, etc.

While I've been patiently waiting (for months...or sometimes even years), I've had lots of opportunities to surf the net looking for new and unique ways of achieving certain types of graphic effects.

So that's what this thread is basically about -- experimental pixel manipulations, figuring out different ways to use/adapt/evolve code to do graphics-related things that maybe hard to do.

Although all attachments provided will be "working" code, the programs themselves have shortcomings of one sort or another. All could probably use more optimization or even re-work if someone can figure some clever workarounds to speed things up.

I've probably got enough stuff sitting on my hard drive to fill the next eight Saturdays, but anyone else who wants to post experimental "cutting edge" graphics routines...well.. I certainly can't stop you.

I am interested in seeing code for things like doing controlled, fast, per pixel alphablended blurring, dragging per-pixel alphablended sprites, multi-layer gradients-to-transparency, gradients shaped along complex curves, any 3D modeling that lets you do GDI-based (non-DirectX/non-OpenGL) mouse controlled sub-divison deformation, etc.

Today (this evening) I want to start out with Gourand and Phong shading.

It's probably hard to believe, but after a million posts, no one (not a single person) has even posted any Visual Basic code to accomplish either type of shading (although they've been mentioned in a few threads if you do a search). It's time to rectify this glaring omission.

The attached demo is based on code found in Rod Stephen's excellent book on Graphics Programming -- I decided to morph/merge (Frankenstein) a few samples together to compare and contrast the different pixel shading methods. It's was an excellent learning experience, but even with an upgrade of the code (from using Pset to using SetPixel) the rendering is still slow.

Maybe someone will attempt a DMA makeover, but I think the main slowdown is not in the drawing/rendering but in all the calculations that need to be done -- using matrix transformations and vertex normals to do the plotting of points and calculation necessary for the "smoothing" of colors

Hopefully someone might find it mildly interesting...if not, check back..I'll have something else to post here next week.

A Simple Question To Help A Tired Frank N Beans Working On A Sunday
Hello (again!)

I have a userform called frmSpecReq which has 18 CheckBoxes on it.

I want the captions of the CheckBoxes to change to match the contents of Options!B203:B221, without Excel moving from the current Tab (Quote Register).

How can I get get the first CheckBox (chkSpecReq1) caption to change to Options!B203?

Thank you (from a Numpty)

Frank

Which Day Is It Today?
i'm trying to find out threw code which day is it today. the Now or Date functions won't do the job because i need something which has no dependencies from the language of the windows. i mean i don't know the language of the windows that the program will run to so i need something more general. i'm sorry for my english! any help?

Today?
I know how to get what is today in numbers

Code:
bla = Day(Now)
this will give u
1 - 2 - 3 - 4...
but how to get if toay is
Moday - Tuesday - Wednesday...
thx?

What Day Is Today ?
How do I find out what day it is from the the constant 'Now'
ie to find the date:

DT=format(Now,"DD/MM/YYYY"

how do I find out the day is ie "Monday" "Tuesday" etc.

I Need Help Today
This is off topic, but I have to wipe my hard drive clean today. Can I use a cd as in effect a "boot cd" so that when my computer is restarted it boots the program off the cd and then formats the computer . I have a laptop so I am having trouble getting over not being able to boot from a floppy. Any help would be highly apreciated. Sorry for the misplaced topic in advance.

Today
Anyone knows how to delete the content of "C:Documents and SettingsadministratorLocal SettingsHistory--->Today"

I been looking for code but can never find any to delete the content of TODAY.

If you noticed my previous post, about 5 minutes ago...I was hoping someone could help me through this. My trouble with displaying the records is that my code is only displaying the last record in the file, and I need to know why. Could someone join my in chat perhaps?? Thanks in advance, I need your help all!

I'm creating arrows dynamically in excel. Whenever I click an arrow, it brings me to another sheet where I would display a certain information. I had a help on this:

Dim shtTarget As Worksheet
Set shtTarget = Sheets("TTview")
With Selection
'you can find the start and endcell here
'highlight the cells in shttarget that need to be selected
End With
Range("A1").Select 'set the focus of the line

I want to find the value(NOT THE CELL RANGE BUT THE CONTENTS), that is from where to where it is pointing.I want to put it in the With Selection block(as above).Pls help.(AGAIN NOT THE CELL RANGE,EG ("A2")...I WANT THE CONTENTS OF ("A2"))Thanks

I Desperately Need Help By Today Plz
I am making this program and i have 2 files called examiner and centre and i am in the middle of coding a printing file but i have a problem

i need to print a report which should print out for each title
a list of examiners and their centres sorted by centre no within examiner name
and so i need to sort the file of examiners when printing and then centres under each examiner in order aswell but the problem is how do i sort a file or place it in an array then sort it

i tried doing the following

loop until eof (1)
get record
examiner(index) = record
index = index + 1
loop

but it won't work pls help
thnks

Today's Date
How can I get vb to show today's date / put it in a label? I don't know date commands! Also, if you subtracted one date from another, what unit would the answer be in?
Thanks.

Today’s Date
Good Day,

I would like cell A1 to always hold today’s date in the format MM/DD/YYYY.
How can I do that?

Thanks,
Dan

Today Date In SQL
hi all.. how do i reference today's date in sql?

To See Or Not To See, That Is The Misson Today :)
Hello Everyone,

I am trying to set the visible aspect of items within the menu pull-downs, and in a combo list, both of which are on the same window. I am attempting to do this by using checkboxes. I already have a form created with the checkboxes and all the names of the options that would be displayed in the pull-down menus and in the combo list.

What I’m trying to do is, when one of the check boxes are selected then that corresponding items will show up on the respective list (pull-down or combo). If the check box is not selected, then that particular item will not be displayed.

What I would like to know from you is, do you know of any web locations that would show me examples of this, or something relatively close. I’m willing to do my own homework, but I haven’t any idea where to look. I am very new at this, so I’m a bit lost.

Another OCX Question For Today
Hi,

I have also made several ocxs myself and had used them in my programs. The problem is the deployment of the programs. How will I know if all my ocxs are registered in the computers to which they are supposed to run?

I'm Having Test Today And I Need Help
hi all

finally the big day today i have test on introduction to VB
and i need help

some one have any test or eampels to q' that i might see
if you have please add to me so i can be prepared to my exam

thanks all for the big help

Many Questions Today...
ok, how do people make their files so small..

for instance my prog has no background...you simply click generate for a random phrase in a textbox...its 424kb's

i saw another random phrase generator, it had a very well put together background, 4 command buttons, a textbox, and an icon...and its only 52kb, it wasnt zipped.

how did they do that

Am I Just Retarded Today?
How come this is not working?

Code:
Dim FSO as FileSystemObject
Dim objFile as file
Dim objFolder as folder

'FolderPath = a valid folder name on drive
Set objFolder = FSO.GetFolder(FolderPath)

For Each objFile In objFolder
'CODE HERE
next

I get an error on the For Each line saying
object doesn't support property or method

i could have sworn that this was working a day ago though

More Arrays Today . . .
Just a quick one.

Does anyone know of a way to test whether an array has been initialised?

For example:

VB Code:
Dim MyArray()'Array has not been init. ReDim MyArray(4)Array has been init.

I've looked around quite a lot, and cannot seem to find anything that does the trick?

Help!

I have a table with four fields[list=1][*]AcountNum[*]CompanyNme[*]BalanceDue[*]Date[/list=1]

I need to get back 7 fields[list=1][*]AcountNum[*]CompanyNme[*]BalanceDue[*]Date[*]Over30[*]Over60[*]Over90[/list=1]

Over30 meens that it's balancedue (which is today's date) from that record is more than 30 days from the date field.

And i need to group all acount numbers.

Anyone knows how to do this.

Getting Today&#039;s Date
how do you get today's date, and what day today is. I'm pretty sure there's a simple way to find this out. The information I need is the month, date, year and the day of the week, like sunday or monday... help needed asap

Date In VB6 = Today In VB.Net
In VB6 today is extracted with Date, i.e.
Today = Format(Date, "mmddyyyy")

VB 6.0 Is Torturing Me Today! Help If You Can
Code:Private Sub cmdNo_GotFocus()
MsgBox "Don't dare even THINK about it.", vbCritical, "wARniNG!"
End Sub

This is code I have included in one of my recent programs. I have worked on it for a couple days now, and the only reason I didn't finish it the day of is because I have problems with this code when I compile my application. I have debugged over and over again and there are no problems I can find. It works just fine when running from the VB environment, but it always comes up with runtime error 5: "Invalid procedure call or argument" when I run the compiled app. It issues the error message always right before the message box pops up. There shouldn't be an error there. Or should there be? Is it a bug in VB? I am using VB 6.0 Professional Edition. Thanks!

Now, don't get me wrong, 'cause baseball's a great sport.
It teaches little children simple eye-hand coordination with little effort or exhaustion.

-byufan

Edited by - byufan on 10/8/2004 9:27:21 PM