FlexCel Studio for VCL/LCL
ContentsIndex
PreviousUpNext
HasXlsDateTime Function

Returns true if the given Format string contains a Date or Time.

Pascal
function HasXlsDateTime(const Format: UTF16String; var HasDate: boolean; var HasTime: boolean): boolean;
C++
boolean HasXlsDateTime(const UTF16String Format, boolean HasDate, boolean HasTime);
Parameters 
Description 
const Format: UTF16String 
Format string in Excel format, like "0.00" or "dd/mm/yyy". 
var HasDate: boolean 
Returns true if the format contains a date. 
var HasTime: boolean 
Return true if the format contains time. 

True if the format contains either a date, a time or both.

You can also get the data returned by this method with XlsFormatValue, but if you are only interested in knowing if a format contains a date/time, this method is easier.

Copyright (c) 2002-2008 TMS Software. All rights reserved.
What do you think about this topic? Send feedback!