Jump to content

Search the Community

Showing results for tags 'Convert'.

  • Search By Tags

    Type tags separated by commas.
  • Search By Author

Content Type


  • W3Schools
    • General
    • Suggestions
    • Critiques
  • HTML Forums
    • CSS
  • Browser Scripting
    • JavaScript
    • VBScript
  • Server Scripting
    • Web Servers
    • Version Control
    • SQL
    • ASP
    • PHP
    • .NET
    • ColdFusion
    • Java/JSP/J2EE
    • CGI
  • XML Forums
    • XML
    • Schema
    • Web Services
  • Multimedia
    • Multimedia
    • FLASH

Find results in...

Find results that contain...

Date Created

  • Start


Last Updated

  • Start


Filter by number of...


  • Start





Website URL








Found 6 results

  1. Hi, i'm reading back and forward but not really coming t a solution. I would like to grab the content of an input field (not inside a form) i am using for date, but just as string. the needed output format is always DD/MM/YYYY so said : 12.02.16 or 2016 12.2.16 or 2016 12-02-16 and so on should all result in 12/02/2016 if there would be a timestamp behind it just needs to be cutted off. I really thought this would be easier :-) But it isn't Maybe somebody could point out a good article or solution for me. Thx. I'm really struggling with the regular expressions :-) var txt='31-12/2016'; var re1='(\\d)'; // Any Single Digit 1 var re2='(\\d)'; // Any Single Digit 2 var re3='(.)'; // Any Single Character 3 var re4='(\\d)'; // Any Single Digit 1 var re5='(\\d)'; // Any Single Digit 2 var re6='(.)'; // Any Single Character 4 var re7='((??:[1]{1}\\d{1}\\d{1}\\d{1})|(?:[2]{1}\\d{3})))(?![\\d])'; // Year 1 var p = new RegExp(re1+re2+re3+re4+re5+re6+re7,["i"]); var m = p.exec(txt); if (m !== null) { var c1=m[1]; var c2=m[2]; var c3="/"; var d1=m[4]; var d2=m[5]; var c4="/"; var year1=m[7]; alert(c1+c2+c3+d1+d2+c4+year1+"\n"); } else { alert("Please check format"); }
  2. hi, sorry, i have a question to do...but i know how to write in sql query ....however the answer need to write on relational algebra in query is like : SELECT * FROM operation where r='broken' group by pc having count(pc) >1 ; π id,pc,result ( σ r = 'broken' (operation)) like group by and having clasue...i no idea ... i searched on internet still @@ .... isnt the answer like that, i using split/step by step method to do rel 1 = σ r = 'broken' (operation) rel 2 = σ count(pc)>1 γ pc,count(pc) (rel 1)) rel 3 = π id,pc,result (rel 2 ) thanks
  3. I want to transfer a string (several values ) into a php array. I know explode is used to do that. But is explode the only way or are there other ways to do this in php?
  4. I am using Microsoft Flight Simulator and 2 programs on it called Simconnect and Websimconnect. FSX <-> Simconnect <-> Websimconnect <-> Webpage Its designed to control things in FSX from a Webpage. One thing it can do is display Radio frequencies and interact with them. The problem is when simconnect reads the radio there not in MHz or KHz, there in BCD16, BCD32, and BCO16. Mainly i want to figure out the BCO16 (binary coded octal 16), how to take BCO16 and convert it to a 4 digit Integer for the Transponder. Transponder is a 4 digit code that each digit runs between 0-7 so 0000-7777. but unlike Binary Base2 or Decimal Base10. BCO16 acts like base 16 instead of base8. So once you got to 0010 it is 16 in BCO16 0100 is 256 and 1000 is 4096. I know i need to use parseInt and to convert the number but not sure what the code hast to be. I know i need to take each digit and parse it out. This is the code to Convert the COM frequency from XXX.XX to BCD format. After the 1 is dropped from the Com freq. var bcd = (parseInt(n1.charCodeAt(0) - 0x30 )<<12) + (parseInt(n1.charCodeAt(1) - 0x30 )<<8) + (parseInt(n2.charCodeAt(0) - 0x30 )<<4) + parseInt(n2.charCodeAt(1) - 0x30 ) but im not sure how to do the BCO16 conversion and i was wondering if somebody could explain it to me. I dont expect it to be done for me but show me how to do it so i can learn it.
  5. Need to convert some columns to different data type, but this statement will not work. Any idea what I am missing? (mgmt Studio has the first 'CAST' and 'AS' underlined. SELECT CAST [ETL_ID as int] as ETL_ID, NAMEX, DU_DEGREE_STATUS, DU_ESTS_DESC, Cast [bANNER_ID as (varchar(36),Null)]as BANNER_ID, DU_COLLEGE_DESC, cAST [DU_DEL_TERM_CODE_ADMIT as (VARCHAR(255),NULL)] AS DU_DEL_TERM_CODE_ADMIT, AGE, ETHNICITY_DESCRIPTION, GENDER, cAST [T1 as (VARCHAR(255),NULL)] AS T1, T1Status, cAST [T2 as (VARCHAR(255),NULL)] as T2, T2Status, cAST [T3 as (VARCHAR(255),NULL)] as T3, T3Status, cAST [T4 as (VARCHAR(255),NULL)] as T4, T4StatusFROM dbo.['Tracking 3$']
  6. binding some data to a componentart datagrid. the date comes in as yymmdd (120312) and for display I do a string format "MM/dd/yyyy". If a user has selected an item in the grid I use a javascript function to loop through the items and build an xml string to update some database records. When getting to the date column it shows Mon Mar 12 00:00:00 CST 2012. Want to reformat that to MM/dd/yyyy before sending off to database. Help??
  • Create New...