Page 1 of 1

How to capitalize day name?

Posted: 21 May 2016, 11:00
by AverageBrick
^+!ScrollLock::
FormatTime, TimeString,,dd'.'MM'.'yy' ('dddd')'
SendInput %TimeString%
return


I'm using non-english date formating which means that my day name is lowercased.

How do I capitalize it?

Example:
monday -> Monday

Re: Capitalize day name?

Posted: 21 May 2016, 11:13
by Capn Odin
[Moderator's note: This post was moved from a duplicate topic started by guest 'AverageBrick'.]

Try this.

Code: Select all

FormatTime, Date, ddMMyy, dddd.MM.yy
MsgBox % Date "`n" Format("{:T}", Date)

Re: How to capitalize day name?

Posted: 21 May 2016, 11:17
by JoeWinograd
After the FormatTime command, do this:

Code: Select all

StringLower,TimeString,TimeString,T
This also works:

Code: Select all

StringUpper,TimeString,TimeString,T
The "T" parameter is what's crucial. Regards, Joe