sbrady Posted October 11, 2012 Share Posted October 11, 2012 if I use _NowDate () it returns 10/11/2012 I need this format 10-11-12 how do I do this. Thanks. Link to comment Share on other sites More sharing options...
FireFox Posted October 11, 2012 Share Posted October 11, 2012 Hi, With the String functions, like StringReplace and StringMid Br, FireFox Link to comment Share on other sites More sharing options...
sbrady Posted October 11, 2012 Author Share Posted October 11, 2012 if I use _NowDate (), is the result a date format or is it really just a string of text that I can manipulate any way I want. Link to comment Share on other sites More sharing options...
Moderators Melba23 Posted October 11, 2012 Moderators Share Posted October 11, 2012 sbrady, Malkey's _Date_Time_Convert UDF is a good place to start. M23 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
kylomas Posted October 11, 2012 Share Posted October 11, 2012 (edited) 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.kylomasedit: just learning english, make that "any other data" Edited October 11, 2012 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 More sharing options...
sbrady Posted October 11, 2012 Author Share Posted October 11, 2012 what is this?#include <date.au3>what is thisconsolewrite('!>>>> ' & vargettype($date) & @lfthanks Link to comment Share on other sites More sharing options...
caleb41610 Posted October 11, 2012 Share Posted October 11, 2012 (edited) $date = _NowDate( ) $date = StringReplace( $date, "/", "-" ) Edited October 11, 2012 by caleb41610 Multi-Connection TCP Server Link to comment Share on other sites More sharing options...
FireFox Posted October 11, 2012 Share Posted October 11, 2012 @sbrady This is a boy searching for the functions in the help file Link to comment Share on other sites More sharing options...
kylomas Posted October 11, 2012 Share Posted October 11, 2012 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 More sharing options...
Moderators Melba23 Posted October 11, 2012 Moderators Share Posted October 11, 2012 (edited) 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. FireFox,Being slightly less ascerbic when replying to new users would be more helpful. M23 Edited October 11, 2012 by Melba23 Typo 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 columnsChooseFileFolder ---- Single and multiple selections from specified path treeview listingDate_Time_Convert -- Easily convert date/time formats, including the language usedExtMsgBox --------- A highly customisable replacement for MsgBoxGUIExtender -------- Extend and retract multiple sections within a GUIGUIFrame ---------- Subdivide GUIs into many adjustable framesGUIListViewEx ------- Insert, delete, move, drag, sort, edit and colour ListView itemsGUITreeViewEx ------ Check/clear parent and child checkboxes in a TreeViewMarquee ----------- Scrolling tickertape GUIsNoFocusLines ------- Remove the dotted focus lines from buttons, sliders, radios and checkboxesNotify ------------- Small notifications on the edge of the displayScrollbars ----------Automatically sized scrollbars with a single commandStringSize ---------- Automatically size controls to fit textToast -------------- Small GUIs which pop out of the notification area Link to comment Share on other sites More sharing options...
sbrady Posted October 11, 2012 Author Share Posted October 11, 2012 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 More sharing options...
kylomas Posted October 11, 2012 Share Posted October 11, 2012 sbrady, You will find help here comensurate with your efforts. Not knowing your background, we gave you the simplest advice possible. Good Luck, 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 More sharing options...
FireFox Posted October 11, 2012 Share Posted October 11, 2012 (edited) FireFox,Being slightly less ascerbic when replying to new users would be more helpful. mouhaha, I find this funny This was a bad joke. Edited October 11, 2012 by FireFox Link to comment Share on other sites More sharing options...
UEZ Posted October 11, 2012 Share Posted October 11, 2012 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 More sharing options...
Recommended Posts
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 accountSign in
Already have an account? Sign in here.
Sign In Now