Jump to content

transfer date to string


sbrady
 Share

Recommended Posts

  • Moderators

sbrady,

Malkey's _Date_Time_Convert UDF is a good place to start. :)

M23

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

sbrady,

yes, the result is a string in date format as demonstrated by this code

;
;
;
#include <date.au3>
local $date = _nowdate()
consolewrite('!>>>> ' & vargettype($date) & @lf)

If you are wondreing whether or not autoit uses any data other format to represent dates, then, not that I know of.

kylomas

edit: just learning english, make that "any other data"

Edited by kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

sbrady,

You should start by looking up each instruction in the Help file. You will quickly realize that you are in over your head. The next step is to read the autoit Wiki articles, and the autoit Help file, FROM THE BEGINNING!

kylomas

Forum Rules         Procedure for posting code

"I like pigs.  Dogs look up to us.  Cats look down on us.  Pigs treat us as equals."

- Sir Winston Churchill

Link to comment
Share on other sites

  • Moderators

sbrady,

If you do not know the answers to your questions - and there is no reason why you should as we all began knowing nothing about AutoIt - and you want to learn, then reading the Help file (at least the first few sections - Using AutoIt, Tutorials and the first couple of References) will help you enormously. You should also look at the excellent tutorials that you will find here and here. :)

Once you have a better grasp on AutoIt syntax and structure, then I suggest you ask your question again - because at the moment all we will do is to confuse you more. ;)

kylomas,

Good advice. :thumbsup:

FireFox,

Being slightly less ascerbic when replying to new users would be more helpful. ;)

M23

Edited by Melba23
Typo

Public_Domain.png.2d871819fcb9957cf44f4514551a2935.png Any of my own code posted anywhere on the forum is available for use by others without any restriction of any kind

Open spoiler to see my UDFs:

Spoiler

ArrayMultiColSort ---- Sort arrays on multiple columns
ChooseFileFolder ---- Single and multiple selections from specified path treeview listing
Date_Time_Convert -- Easily convert date/time formats, including the language used
ExtMsgBox --------- A highly customisable replacement for MsgBox
GUIExtender -------- Extend and retract multiple sections within a GUI
GUIFrame ---------- Subdivide GUIs into many adjustable frames
GUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView items
GUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeView
Marquee ----------- Scrolling tickertape GUIs
NoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxes
Notify ------------- Small notifications on the edge of the display
Scrollbars ----------Automatically sized scrollbars with a single command
StringSize ---------- Automatically size controls to fit text
Toast -------------- Small GUIs which pop out of the notification area

 

Link to comment
Share on other sites

I am not a programmer coder guy........I do audio and video production, but. I was able to teach myself Applescript on the Mac. The people on Apple forums were all very helpful. Yes it took me years to get to the point where I could get Applescript to do what I need. So here I am. I have written 80+ Applescripts that I use on my work computer to manage all my files and folders. It cuts out 95% of the clicking, opening, moving, sizing, copying, finding. No one on planet earth knows how cool my work life is due to Applescript. Now my work is going BACK to PC.......yes for me its a nightmare. I will have to throw away my reputation for being lightning fast and accurate. The comments to me are........lock yourself in a closet and read and learn the manual. I had the same problem with Applescript. I needed a kind soul to teach me and help fill in the blanks, and I found that on the Apple's Applescript forums. There is a difference between Mac and PC. I'll figure it all out...........eventually. Thanks for any offers to help.

Link to comment
Share on other sites

Here 3 examples which came to my mind yet:

$sDate = "10/11/2012"

$sString1 = StringLeft($sDate, 2) & "-" & StringMid($sDate, 4, 2) & "-" & StringRight($sDate, 2)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sString1 = ' & $sString1 & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
$sString2 = StringLeft(StringReplace($sDate, "/", "-"), 6) & StringRight($sDate, 2)
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sString2 = ' & $sString2 & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console
$sString3 = StringRegExpReplace($sDate, "(d+)/(d+)/d{2}(d+)", "$1-$2-$3")
ConsoleWrite('@@ Debug(' & @ScriptLineNumber & ') : $sString3 = ' & $sString3 & @crlf & '>Error code: ' & @error & @crlf) ;### Debug Console

Br,

UEZ

Please don't send me any personal message and ask for support! I will not reply!

Selection of finest graphical examples at Codepen.io

The own fart smells best!
Her 'sikim hıyar' diyene bir avuç tuz alıp koşma!
¯\_(ツ)_/¯  ٩(●̮̮̃•̃)۶ ٩(-̮̮̃-̃)۶ૐ

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...