Click here to Skip to main content
65,938 articles
CodeProject is changing. Read more.
Articles / web / ASP.NET

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

3.12/5 (8 votes)
13 Jan 2008CPOL 1   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#

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

C#
/// 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

License

This article, along with any associated source code and files, is licensed under The Code Project Open License (CPOL)