Your Download has Started!
Skip to main content

Download Date & Time

Downloads DataFlex Date & Time
Back to overview

Description

When working with date and time in your applications it is important to consider for example:

  • The different timezones
  • Daylight saving time
  • The current system date and time
  • But also the milliseconds it takes to startup a system

The DataFlex Date & Time Library contains several functions to assist with anything date and time related in your DataFlex applications.This download contains a library and a demo application. The library can be used when working with dates and times. The library contains three classes

  • cDateTimeHandler
  • cMathHandler
  • cLocaleInfoHandler

Note

The Conversions Library is needed to be able to install and use this library

Features

cDateTimeHandler class

This class contains the following functions:

  • CompareFileTimes - Compares two time values (earlier, equal and later)
  • TickCount / TickCount64 - Retrieves the number of milliseconds that have elapsed since the system was started
  • SetLocalTime - Sets the current local time and date
  • SystemTimes - Retrieves system timing information
  • QueryPerformanceCounter - Retrieves the current value of the performance counter
  • QueryPerformancePercentage - Retrieves the frequency of the performance counter
  • QueryUnbiasedInterruptTime - Gets the current unbiased interrupt-time count
  • SystemTime - Retrieves the current system date and time in UTC format
  • SetSystemTime - Changes the system time
  • SystemTimeAdjustment - Determines whether the system is applying periodic time adjustments to its time-of-day clock
  • FormatSystemTimeToTime - Formats a tSystemTime value to a DataFlex Time value using the regional settings
  • TimeZoneInformation - Retrieves the current time zone settings
  • TimeZoneInformationForYear - Retrieves the current time zone settings for a specific year
  • SystemTimeToFileTime - Helper function to convert a time value
  • SystemTimeToTzSpecificLocalTime - Converts a tSystemTime value via TimeZoneInformation to a TimeZone Specific Local Time
  • FileTimeToLocalFileTime - Converts a UTC file time to a local file time
  • FormatSystemTimeToDate - Formats a tSystemTime value to a DataFlex Date value using the regional settings
  • FileTimeToDateTime - Converts a tWinFileTime value to a DataFlex DateTime value
  • SystemTimeAsFileTime - Retrieves the current system Date and Time in UTC format
  • DateTimeToFileTime - Converts a DateTime value into a tWinFileTime value
  • DateTimeToSystemTime - Converts a DateTime value to a tSystemTime Value
  • TransitionDateTime - Converts a transition time (from DST to STD or vice-versa) to a formatted date and time
  • FirstDayOfWeek - Ask the Windows API what the first day of the week is for the current locale
  • FirstWeekOfYear - Ask the Windows API what the first week of a year is for the current locale
  • MondayOfWeekYear - Returns the date of the monday in a given week in a given year
  • StartDateFirstWeekOfYear - Returns the date of the first day of the first week in a given year
  • TransitionDateTimeForYear - Converts - like the TransitionDateTime - a transition time (from DST to STD or vice-versa) to a formatted date and time
  • SystemTimeToDateTime - Formats a tSystemTime value to a DataFlex DateTime value
  • ISO8601WeekNumber - Returns the weeknumber of a given date according to ISO 8601
  • UnixTimeToUTCDateTime - Calculates the UTC DateTime from a UNIX time
  • UnixTimeToLocalDateTime - Calculates the DateTime from a UNIX time
  • DateTimeToUnixTime - Returns the UNIX time from a given datetime value
  • DateTimeToJavaScriptTime - Returns the JavaScript time from a given datetime value. JS time is the number of milliseconds since 1/1/1970
  • JavaScriptTimeToLocalDateTime - Calculates the DateTime from a JavaScript time. JS time is the number of milliseconds since 1/1/1970
  • JavaScriptTimeToUTCDateTime - Calculates the UTC DateTime from a JavaScript time. JS time is the number of milliseconds since 1/1/1970
  • CurrentUTCDateTime - Gets the UTC date & time by converting the local date & time to a UNIX time which is always a UTC time

Note: The JavaScript* functions do only exist in version 20.1.1 and higher of the library 

cMathHandler class

This class contains the following helper functions

  • Ceiling - Returns the least integer less than or equal to the passed value
  • Floor - Returns the greatest integer less than or equal to the passed value

cLocaleInfoHandler class

This class contains the following helper functions

  • LocaleMonthName - Retrieves the locale value for the month name for the locale specified in psLocaleName
  • LocaleDayName - Retrieves the locale value for the day name for the locale specified in psLocaleName
  • LocaleShortDateFormat - Retrieves the short date format for the locale specified in psLocaleName
  • LocaleLongDateFormat - Retrieves the long date format for the locale specified in psLocaleName
  • LocaleTimeFormat - Retrieves the time format for the locale specified in psLocaleName
  • LocaleFirstDayOfWeek - Retrieves the locale value for the first day of the week for the locale specified in psLocaleName
  • LocaleFirstWeekOfYear - Ask the Windows API what the first week of a year is for the locale specified in psLocaleName
  • LocaleDecimalSeparator - Retrieves the decimal separator for the locale specified in psLocaleName
  • LocaleThousandsSeparator - Retrieves the thousands separator for the locale specified in psLocaleName
  • LocaleCurrencySymbol - Retrieves the currency symbol for the locale specified in psLocaleName
  • AllLocaleCodes - Return all possible locale codes

 

Screenshots

DateTime - Filetime
DateTime - JavaScript Time function usage
DateTime - Local time
DateTime - Locale Info
DateTime - Performance
DateTime - System Time
DateTime - System times
DateTime - Timezones
DateTime - tickcounts
DateTime - time adjustment
DateTime - Unbiased time
DateTime - Unix time
DateTime - UTC
DateTime - Weeknumber
Publisher: Data Access Worldwide Version: For DataFlex 24.0 Publication: March 28, 2024 File size: 5.2 MB

Support

Supported versions

  • DataFlex 2024 / 24.0
  • DataFlex 2023 / 23.0
  • DataFlex 2022 / 20.1
  • DataFlex 2019 / 19.1

 For support go to:

 

Readme

Prior versions

  • Small UI changes in demo application
  • Corrections to the ’.fff’ support that was added in 20.1

  • New functions to deal with JavaScript datetime stamps. These are essential UNIX datetime stamps but now based on milliseconds instead of seconds
  • Several datetime formatting functions have been extended to support the milliseconds part of a datetime
  • Demo application extended with a tab-page to test the JavaScript datetime stamps
  • New class to append ’.fff’ to the mask of a datetime form

  • Replaced the incorrectly added multi-line string function of the cLocaleInfoHandler class with one that compiles under DataFlex v20.0

Beta

Pre-releases

Legacy

Quotes

FAQ