OriginLab Corporation - Data Analysis and Graphing Software - 2D graphs, 3D graphs, Contour Plots, Statistical Charts, Data Exploration, Statistics, Curve Fitting, Signal Processing, and Peak Analysis     
Skip Navigation Links
All BooksExpand All Books
LabTalk ProgrammingExpand LabTalk Programming
Language ReferenceExpand Language Reference
Reference TablesExpand Reference Tables

3.9.3 Date and Time Format Specifiers

Date Time Specifiers

Date and time format specifiers for custom date and time output.

Specifier Description
d Day number, no leading zero
dd Day number, with leading zero
ddd 3-character day name
dddd Full day name
M Month number, no leading zero
MM Month number, leading zero
MMM 3-character month name
MMMM Full month name
yy 2-character year (Input < 45 interpreted as 20yy)
yyyy 4-character year
h Hour, no leading zero (12 hour time)
hh Hour, with leading zero (12 hour time)
H Hour, no leading zero (24 hour time)
HH Hour, leading zero (24 hour time)
m Minute, no leading zero
mm Minute, with leading zero
s Second, no leading zero
ss Second, with leading zero
# Fractional seconds (each # is one decimal place, up to 6)
t Displays A or P (for AM and PM)
tt Displays AM or PM


col(1)[1] = @D;
wks.col1.setformat(4,22,dddd', 'MMMM' 'dd', 'yyyy' 'hh':'mm' 'tt); // Shows todat's date
wks.col1.width = 24;

© OriginLab Corporation. All rights reserved.