Hi Michael,
what about Date$?
But maybe adding DT_GetDate alias would be good choice - I was thinking about exactly the same today.
Petr
I cant see a way to get the current date.
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Hi Michael,
what about Date$?
But maybe adding DT_GetDate alias would be good choice - I was thinking about exactly the same today.
Petr
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Thats one option I will give you that.
I do think that the date module should also return the date.
think Ive asked this question before
Home Desktop : Windows 7 - Intel Pentium (D) - 3.0 Ghz - 2GB - Geforce 6800GS
Home Laptop : WinXP Pro SP3 - Intel Centrino Duo - 1.73 Ghz - 2 GB - Intel GMA 950
Home Laptop : Windows 10 - Intel(R) Core(TM) i5-4210U CPU @ 1.70GHz, 2401 Mhz, 2 Core(s), 4 Logical Processor(s) - 4 GB - Intel HD 4400
Work Desktop : Windows 10 - Intel I7 - 4 Ghz - 8GB - Quadro Fx 370
Sorry, the DT_GetDate() isn't available, but I'll add it ASAP.
I can't figure out why it was not already developed, may be because the core module provides the DATE$ keyword.
Regards,
Roberto
http://www.thinbasic.com
Thanks Roberto
Learn 3D graphics with ThinBASIC, learn TBGL!
Windows 10 64bit - Intel Core i5-3350P @ 3.1GHz - 16 GB RAM - NVIDIA GeForce GTX 1050 Ti 4GB
Added the DT_GetDate() function to the ThinBasic's DT module
The function can have one optional parameters (please see below for the constant value) for specify the date format requested, here is an example:
[code=thinbasic]uses "DT"
USES "CONSOLE"
CONSOLE_WRITELINE("DT_GetDate(%DT_MM_DD_YY) = "+DT_GetDate(%DT_MM_DD_YY))
CONSOLE_WRITELINE("DT_GetDate(%DT_MM_DD_YYYY) = "+DT_GetDate(%DT_MM_DD_YYYY))
CONSOLE_WRITELINE("DT_GetDate(%DT_DD_MM_YY) = "+DT_GetDate(%DT_DD_MM_YY))
CONSOLE_WRITELINE("DT_GetDate(%DT_DD_MM_YYYY) = "+DT_GetDate(%DT_DD_MM_YYYY))
CONSOLE_WRITELINE("DT_GetDate(%DT_YY_MM_DD) = "+DT_GetDate(%DT_YY_MM_DD))
CONSOLE_WRITELINE("DT_GetDate(%DT_YYYY_MM_DD) = "+DT_GetDate(%DT_YYYY_MM_DD))
CONSOLE_WRITELINE("DT_GetDate() = "+DT_GetDate())
CONSOLE_WRITELINE($CRLF + "Press any key to exit.")
CONSOLE_WAITKEY
'' Output of above code:
'
''DT_GetDate(%DT_MM_DD_YY) = 04-15-09
''DT_GetDate(%DT_MM_DD_YYYY) = 04-15-2009
''DT_GetDate(%DT_DD_MM_YY) = 15-04-09
''DT_GetDate(%DT_DD_MM_YYYY) = 15-04-2009
''DT_GetDate(%DT_YY_MM_DD) = 09-04-15
''DT_GetDate(%DT_YYYY_MM_DD) = 2009-04-15
''DT_GetDate() = 04-15-2009
''Press any key to exit.[/code]
You'll find this update in the next ThinBasic Release.
Regards,
Roberto
http://www.thinbasic.com
Bookmarks