Skip to main content
Home
Live to Learn!

Main navigation

  • Home
  • Learn
    • FoxPro
    • MS-DOS
    • C PRG
    • Java
    • ASP
    • Ruby on Rails
    • ASP.NET
    • E-Books
    • Exam Preparation
    • Tools
  • Blog
  • Forums
  • Contact
User account menu
  • Log in

Breadcrumb

  1. Home
  2. FoxPro Programming

Simple Weekly Calendar Generation

Book navigation

  • FoxPro Commands - Part 1
  • Foxpro commands - Part 2
  • Data Types in FoxPro
  • Numeric Functions in FoxPro
  • Creating a Program
  • Input and Output Statements in Foxpro
  • Control Structures in Foxpro
  • Creating menu in Foxpro for DOS
  • Simple Journal Entry program
  • Simple Ledger creation & Posting Program
  • Trial Balance Program
  • Balance Sheet Program
  • Simple Weekly Calendar Generation
  • How to install FoxPro 2.6 in Windows 10 / Windows 8 / Windows 7?
  • How to install FoxPro 2.6 on Linux OS (Ubuntu 20.04 | 20.10 | 21.04)?
  • How to install FoxPro in Windows 10 64 bit using VDosPlus?
By Karthikeyan , 9 August, 2013
This program is a simple example to handle with date and week days, printing in Foxpro. Construct yourself for your requirement based on this example. This program saves the out put to a text file name cal.txt.

set stat off
set safe off
set talk off
set date brit
set cent on
set alte to cal.txt
set alte on

dt=ctod("01/06/2013") 
mn1=MONTH(DT)
ln=repl('-',80)
lno=0
for i=1 to 365
    mn2=month(dt)
    if mn1=mn2
       ?ln
       ?dt,cdow(dt)
       if cdow(dt)="Sunday"
          ??space(15),"HOLIDAY"
       endif   
       ?
       ?
       lno=lno+4
    endif
    do whil lno=68 or mn1<>mn2
       do whil lno<72
          ?
          lno=lno+1
       enddo   
       if mn1<>mn2
          ?ln
          ?dt,cdow(dt)
          if cdow(dt)="Sunday"
             ??space(15),"HOLIDAY"
          endif   
          ?
          ?
          lno=4
          mn1=mn2
       else
          lno=0
       endif
    enddo
    dt=dt+1
endfor   
?ln
clos all
clea all
modi comm cal.txt
  • Add new comment

Comments

Featured Blog Posts

Convert Currency in Number to Words (Indian Rupees) - MS Excel
Foxpro Tutorial and Programs
Convert Currency in Number to Words in MS Word
Convert Currency in Number to Words (Indian Rupees) - Version 2
Best way to Use Rupee Symbol in Windows – Easy steps
Convert Currency in Number to Words - MS Access
Creating All in One Windows XP DVD with all Important Applications
RSS feed

© 2009-2025 Live to Learn.In

Terms of Use | Privacy Policy