LB Booster
« DATE$ formats »

Welcome Guest. Please Login or Register.
Apr 1st, 2018, 04:29am



ATTENTION MEMBERS: Conforums will be closing it doors and discontinuing its service on April 15, 2018.
We apologize Conforums does not have any export functions to migrate data.
Ad-Free has been deactivated. Outstanding Ad-Free credits will be reimbursed to respective payment methods.

Thank you Conforums members.
Speed up Liberty BASIC programs by up to ten times!
Compile Liberty BASIC programs to compact, standalone executables!
Overcome many of Liberty BASIC's bugs and limitations!
LB Booster Resources
LB Booster documentation
LB Booster Home Page
LB Booster technical Wiki
Just BASIC forum
BBC BASIC Home Page
Liberty BASIC forum (the original)

« Previous Topic | Next Topic »
Pages: 1  Notify Send Topic Print
 thread  Author  Topic: DATE$ formats  (Read 567 times)
Richard Russell
Administrator
ImageImageImageImageImage


member is offline

Avatar




Homepage PM


Posts: 1348
xx DATE$ formats
« Thread started on: Feb 1st, 2012, 4:41pm »

In LB4 DATE$ provides only three formats for returning the date as a string:

Code:
  print date$("mm/dd/yyyy") ' 01/30/2012
  print date$("mm/dd/yy")   ' 01/30/12
  print date$("yyyy/mm/dd") ' 2012/01/30 

LBB is more flexible, it will return the date in any format that can be constructed from the following elements, in any order, separated by '/' or '-':

dDay of month as digits with no leading zero for single-digit days.
ddDay of month as digits with leading zero for single-digit days.
dddDay of week as a three-letter abbreviation.
ddddDay of week as its full name.
mMonth as digits with no leading zero for single-digit months.
mmMonth as digits with leading zero for single-digit months.
mmmMonth as a three-letter abbreviation.
mmmmMonth as its full name.
yYear as last two digits, but with no leading zero for years less than 10.
yyYear as last two digits, but with leading zero for years less than 10.
yyyyYear represented by full four digits.

So for example:

Code:
print date$("dddd dd-mmmm-yyyy") ' Sunday 30-January-2012 

Richard.
User IP Logged

JosephE
New Member
Image


member is offline

Avatar




PM

Gender: Male
Posts: 35
xx Re: DATE$ formats
« Reply #1 on: Mar 14th, 2014, 6:00pm »

I took the liberty of adding this to the wiki: Date Formatting Extended Functionality
User IP Logged

Pages: 1  Notify Send Topic Print
« Previous Topic | Next Topic »

| |

This forum powered for FREE by Conforums ©
Terms of Service | Privacy Policy | Conforums Support | Parental Controls