## TimeSpan::ToString() const method


Returns the string representation of the time interval represented by the current object.

```cpp
String System::TimeSpan::ToString() const
```

## See Also

* Class [String](../../string/)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
## TimeSpan::ToString(const String\&) const method


Converts the value of the current object to equivalent string representation, using the specified format.

```cpp
String System::TimeSpan::ToString(const String &format) const
```

## See Also

* Class [String](../../string/)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
## TimeSpan::ToString(const String\&, const SharedPtr\<IFormatProvider\>\&) const method


Converts the value of the current object to equivalent string representation, using the specified format and format provider.

```cpp
String System::TimeSpan::ToString(const String &format, const SharedPtr<IFormatProvider> &provider) const
```

## See Also

* Class [String](../../string/)
* Typedef [SharedPtr](../../sharedptr/)
* Class [IFormatProvider](../../iformatprovider/)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
## TimeSpan::ToString(const String\&, const SharedPtr\<Globalization::CultureInfo\>\&) const method




```cpp
String System::TimeSpan::ToString(const String &format, const SharedPtr<Globalization::CultureInfo> &culture) const
```

## See Also

* Class [String](../../string/)
* Typedef [SharedPtr](../../sharedptr/)
* Class [CultureInfo](../../../system.globalization/cultureinfo/)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
## TimeSpan::ToString(const String\&, const SharedPtr\<Globalization::DateTimeFormatInfo\>\&) const method




```cpp
String System::TimeSpan::ToString(const String &format, const SharedPtr<Globalization::DateTimeFormatInfo> &dtfi) const
```

## See Also

* Class [String](../../string/)
* Typedef [SharedPtr](../../sharedptr/)
* Class [DateTimeFormatInfo](../../../system.globalization/datetimeformatinfo/)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
## TimeSpan::ToString(const String\&, std::nullptr_t) const method




```cpp
String System::TimeSpan::ToString(const String &format, std::nullptr_t) const
```

## See Also

* Class [String](../../string/)
* Class [TimeSpan](../)
* Namespace [System](../../)
* Library [Aspose.PUB for C++](../../../)
