65.9K
CodeProject is changing. Read more.
Home

Change Over All Georgian(Miladi) Dates that Exist in Dataset to Shamsi Date

starIconstarIconstarIcon
emptyStarIcon
starIcon
emptyStarIcon

3.12/5 (8 votes)

Jan 13, 2008

CPOL
viewsIcon

34598

downloadIcon

250

This Control can change the Georgian dates in Dataset to Shamsi date (For Report)

Introduction

In this article, we solve the date problem in Dataset. A user sends the dataset to his report, and she or he cannot convert the existing dates in dataset. We solved this problem for developers. You can use our component to change over all the Georgian dates to the Shamsi date.

How to Use

After downloading our component, add this to your project references.

Define an instance of Component:

C#

   /// Define New Dataset : dates of this dataset will change.
   DataSet ds = new DataSet(); 
     
   /// Define New Instance of Component 
   DateBulkConvertor.Convertor MyConvert = new DateBulkConvertor.Convertor();
 
   ///set Your DataSet to our dataset for change 
   MyConvert.MyDataset = ds;    
    
   ///Define a Dataset : this dataset is for retrieving the result 

   DataSet mydataset = new DataSet();    
   
   /// Change Dates and Return Result to Dataset
   mydataset = myconvert.changeDates(); 

Retrieve Types

/// Result is Short type : Ex . 1386/10/10 
myconvert.ModifyDate = DateBulkConvertor.dtTypes.ShortDate;

/// Result is Long type : Ex . 1386/10/10 20:30
myconvert.ModifyDate = DateBulkConvertor.dtTypes.LongDate;

Good luck!

History

  • 13th January, 2008: Initial post